(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 12.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[    169783,       3504]
NotebookOptionsPosition[    161268,       3347]
NotebookOutlinePosition[    161661,       3363]
CellTagsIndexPosition[    161618,       3360]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Electrochemical Synthesis Diagram Calculator", "Title",
 CellChangeTimes->{{3.7976006036731157`*^9, 
  3.797600617159995*^9}},ExpressionUUID->"32d9e6ef-774a-4d56-8931-\
d7d7a13607b6"],

Cell[TextData[{
 "Mary Elizabeth Wagner, 05.18.20, version 1.1\n\nThis Notebook is used to \
link the cathode potential of two different metals to the composition of the \
alloy created. \n\nPlease double check that you are downloading the most \
current version. If the database you need for your calculations is not \
available on the server, please follow the instructions \
\[OpenCurlyDoubleQuote]How to Make a Database for ESD\[CloseCurlyDoubleQuote]\
\n\nIt is ",
 StyleBox["highly",
  FontSlant->"Italic"],
 " recommended that you read G. Kaptay: Electrochim. Acta, 60(2012), 401. \
10.1016/j.electacta.2011.11.077 before proceeding and look at the slides from \
ARG Seminar 4/15/20. "
}], "Text",
 CellChangeTimes->{{3.797600622482788*^9, 3.797600637003607*^9}, {
  3.7976089039755583`*^9, 3.7976089843442497`*^9}, {3.797609021498735*^9, 
  3.797609030414361*^9}, {3.797609448678526*^9, 3.797609463780058*^9}, {
  3.7976801248138847`*^9, 3.797680132561756*^9}, {3.797680711769821*^9, 
  3.797680764961692*^9}, {3.797681087148769*^9, 3.7976811191248627`*^9}, {
  3.798823215000134*^9, 3.798823238005906*^9}, {3.800203029656096*^9, 
  3.8002030317293043`*^9}},ExpressionUUID->"ffe88410-edca-40aa-9a3c-\
6798e7c4bbc5"],

Cell[CellGroupData[{

Cell["Thermodynamic Assumptions", "Section",
 CellChangeTimes->{{3.797600660164179*^9, 3.797600664168488*^9}, {
  3.797609050362658*^9, 
  3.797609072306775*^9}},ExpressionUUID->"17e57d52-0b7f-4f8f-8243-\
f86eb1b1d02c"],

Cell[TextData[{
 "The following calculator was derived for a specific set of thermodynamic \
conditions and assumptions. Expanding beyond these assumptions is done at the \
user\[CloseCurlyQuote]s own risk.\n\n1. All reactions take place at a \
constant T and P \n2.  The supporting electrolyte is stable enough that it \
can be reasonably assumed to be non-electroactive and it does not alloy with \
the cathode.\n3. The metal host used in the cathode, if not one of the two \
metals being investigated for co-deposition, is a stable metal and does not \
back-react and dissolve into the electrolyte. \n4. The cathode is a liquid \
metal. Multiple liquid phases are allowed, but they must be liquid.\n5. All \
energies of reaction are normalized ",
 StyleBox["per mole of metal",
  FontWeight->"Bold"],
 StyleBox[". ",
  FontWeight->"Bold",
  FontSlant->"Italic"]
}], "Text",
 CellChangeTimes->{{3.797609074663866*^9, 3.7976091805179567`*^9}, 
   3.797609467134419*^9, {3.797611139245569*^9, 3.79761124633356*^9}, {
   3.797680109599209*^9, 3.79768011273591*^9}, {3.7976814043009787`*^9, 
   3.797681431031601*^9}, {3.7976843999768887`*^9, 3.7976844041824503`*^9}, {
   3.7976844387554293`*^9, 
   3.79768444429632*^9}},ExpressionUUID->"8a9184aa-eecf-4a83-b0b9-\
b6377d72dd0e"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Step 1: Establishing Database, Elements, and Temperature", "Section",
 CellChangeTimes->{{3.797600667679308*^9, 3.7976006714638653`*^9}, {
  3.797600707829278*^9, 
  3.797600740118629*^9}},ExpressionUUID->"876be60e-d363-411e-a275-\
068876498a08"],

Cell[CellGroupData[{

Cell["Mapping Directory and Establishing Database", "Subsection",
 CellChangeTimes->{{3.797684820742976*^9, 
  3.7976848303484898`*^9}},ExpressionUUID->"5ccde8a6-107a-4149-bfc9-\
6fae6c6db160"],

Cell["\<\
1. Copy this notebook to a folder on your computer titled \
\[OpenCurlyDoubleQuote]ARG_mathematica_models\[CloseCurlyDoubleQuote]. 
2. From the server, copy the folder \[OpenCurlyDoubleQuote]TD_data_metalnorm\
\[CloseCurlyDoubleQuote] into the \
\[OpenCurlyDoubleQuote]ARG_mathematica_models\[CloseCurlyDoubleQuote] folder. \
If you are investigating a metal pair whose data does not appear in \
\[OpenCurlyDoubleQuote]TD_data_metalnorm\[CloseCurlyDoubleQuote], then you \
will need to follow the instructions to import data from FactSage. \
\>", "Text",
 CellChangeTimes->{{3.797684837313106*^9, 3.7976850040833187`*^9}, {
  3.7976851099490213`*^9, 3.797685182187722*^9}, {3.797685426134198*^9, 
  3.7976854444544277`*^9}, {3.79768555309778*^9, 3.7976856172423563`*^9}, {
  3.797954021294879*^9, 
  3.797954044968557*^9}},ExpressionUUID->"78d0787f-fe76-4c8f-ba0c-\
2e5e3c5029ba"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Defining Your Process Conditions and System", "Subsection",
 CellChangeTimes->{{3.797685628096644*^9, 
  3.797685658353863*^9}},ExpressionUUID->"54bc6fca-5c22-4fe3-9889-\
85033b1f6643"],

Cell[TextData[{
 "ESD\[CloseCurlyQuote]s work by comparing the behavior of two different \
species co-depositing during electrolysis. A third species can only be \
considered by adding an extra dimension to the plot (similar to ternary \
diagrams). \n\nFirst, you need to decide which two elements you are \
interested in comparing. On a standard state electropotential series, Metal A \
(mA) will be the more noble metal. Metal B (mB) will be the more reactive \
metal. \[OpenCurlyDoubleQuote]nA\[CloseCurlyDoubleQuote] is defined as the \
number of electrons required to reduce ",
 StyleBox["one mole of metal",
  FontWeight->"Bold"],
 StyleBox[" ",
  FontWeight->"Bold",
  FontSlant->"Italic"],
 StyleBox["A",
  FontWeight->"Bold"],
 StyleBox[". ",
  FontWeight->"Bold",
  FontSlant->"Italic"],
 "\[OpenCurlyDoubleQuote]nB\[CloseCurlyDoubleQuote] is defined similarly. \n\n\
You will also define your temperature (K) at this point. \n\nFinally, you \
need to define any additional element in the cathode. This element must be \
fixed along a pseudobinary with either the noble metal or the more reactive \
metal. \n\nWhen you are ready, run the function runGUI to define your \
variables."
}], "Text",
 CellChangeTimes->{{3.7976857635746927`*^9, 3.797685821148179*^9}, {
  3.797685863391678*^9, 3.7976860079705563`*^9}, {3.797686292411674*^9, 
  3.797686312690441*^9}, {3.797787927421647*^9, 3.797787999434993*^9}, {
  3.797954057905046*^9, 3.797954106289524*^9}, {3.7979541605669003`*^9, 
  3.7979541844239683`*^9}, {3.797954232003283*^9, 3.797954249093628*^9}, {
  3.798824878970912*^9, 
  3.798824879488481*^9}},ExpressionUUID->"a2b9b9a2-71b0-4c9e-867d-\
9676d3dd33f8"],

Cell[BoxData[
 RowBox[{"runGUI", " ", ";"}]], "Input",
 CellChangeTimes->{{3.7982019858730783`*^9, 3.79820200707508*^9}, {
   3.7983021634009542`*^9, 3.798302289939806*^9}, {3.798302369994164*^9, 
   3.798302408083737*^9}, {3.798302479122095*^9, 3.7983024913402853`*^9}, {
   3.798302525370017*^9, 3.798302546908794*^9}, {3.7983039061504717`*^9, 
   3.798304084330475*^9}, {3.798307253736764*^9, 3.7983073351367693`*^9}, {
   3.798307519855311*^9, 3.7983075679775257`*^9}, {3.798307846418652*^9, 
   3.798307925300642*^9}, {3.798307965299727*^9, 3.7983079679069853`*^9}, {
   3.798308312417151*^9, 3.798308312727178*^9}, {3.79830845068316*^9, 
   3.798308466149701*^9}, {3.798308506401154*^9, 3.798308523417042*^9}, {
   3.79830875209015*^9, 3.7983088356127863`*^9}, 3.798308894194376*^9, {
   3.798308927551866*^9, 3.798308935578104*^9}, {3.798309222767783*^9, 
   3.798309230648679*^9}, {3.798309272644994*^9, 3.798309279470118*^9}, {
   3.79830935306106*^9, 3.79830936657393*^9}, {3.798309530731536*^9, 
   3.798309533733685*^9}, {3.798309640197008*^9, 3.798309650808552*^9}, {
   3.7983097830871773`*^9, 3.798309790701206*^9}, {3.7983102152675467`*^9, 
   3.798310215914763*^9}, 3.7983102710671587`*^9, {3.7983104760185537`*^9, 
   3.798310482114731*^9}, {3.7984776716756287`*^9, 3.7984776723139143`*^9}, {
   3.8002789834032307`*^9, 3.8002789843028793`*^9}, {3.800290759126274*^9, 
   3.80029075978522*^9}, {3.803915697724634*^9, 3.8039156982836227`*^9}, {
   3.806762687584814*^9, 3.806762688317424*^9}, {3.806762826124796*^9, 
   3.8067628280132437`*^9}, {3.806762936493432*^9, 3.80676293708072*^9}, 
   3.8067630401996517`*^9, {3.8067631748598127`*^9, 3.806763175622908*^9}, {
   3.807373628298664*^9, 3.807373630758932*^9}, 3.807374422129631*^9},
 Background->RGBColor[0.87, 0.94, 1],
 CellLabel->"In[44]:=",ExpressionUUID->"f3e84a73-d3e3-4ae7-8ad6-02bcb1c996d9"]
}, Open  ]],

Cell[CellGroupData[{

Cell["An Aside on Pseudobinaries", "Subsection",
 CellChangeTimes->{{3.798210467476592*^9, 
  3.798210478267226*^9}},ExpressionUUID->"84c57191-9e00-4aec-8285-\
cf8c21ec009f"],

Cell["\<\
You have the option to define an additional element present in the cathode. \
That additional element must be fixed along a pseudobinary with one of your \
two main depositing metals. (e.g., in cast iron, the binary Fe-C eutectic \
takes place at 17% C. If you wanted to fix your amount of carbon at the \
eutectic, then you would ensure that for every 1 mol of Fe added to the \
system, .205 mol C would be added. No matter how much Cu is put into the \
system, the ratio of Fe to C will remain fixed. \
\>", "Text",
 CellChangeTimes->{{3.7982105220165567`*^9, 3.798210561876649*^9}, {
  3.7982106100965023`*^9, 
  3.7982106122013807`*^9}},ExpressionUUID->"eb5661ce-a565-4749-8157-\
1ac23907b932"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Step 2: Plotting ESD", "Section",
 CellChangeTimes->{{3.7976007530470037`*^9, 3.797600773819969*^9}, {
  3.798202068803865*^9, 
  3.7982020714164543`*^9}},ExpressionUUID->"3e66200f-7768-4fec-bf54-\
5ba6e9648884"],

Cell["\<\
The Electrochemical Synthesis Diagram plotter only takes one input, the \
domain over which you want to plot (mol percentage ranging from 0 100%).\
\>", "Text",
 CellChangeTimes->{{3.7982098589172907`*^9, 3.7982098859031343`*^9}, {
  3.79820991899294*^9, 3.7982099399770203`*^9}, {3.7982100125421*^9, 
  3.7982101143573017`*^9}, {3.7982102442106113`*^9, 3.798210361987801*^9}, {
  3.798210435348811*^9, 3.798210458613852*^9}, {3.798210578089572*^9, 
  3.7982105902633867`*^9}, {3.7982106250382843`*^9, 
  3.79821066058918*^9}},ExpressionUUID->"57945187-9795-456b-924e-\
9779f16492f5"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"EdiagramPlotter", "[", "100", "]"}]], "Input",
 CellChangeTimes->{{3.798209928215474*^9, 3.79820992851943*^9}, {
   3.798380633030102*^9, 3.798380633588368*^9}, {3.798381954141876*^9, 
   3.798381954760631*^9}, {3.798389771673286*^9, 3.7983897884539833`*^9}, {
   3.798389912690816*^9, 3.798389941709498*^9}, {3.798390778841392*^9, 
   3.79839077982514*^9}, 3.7983994624217043`*^9, {3.7983995204545813`*^9, 
   3.798399520557876*^9}, {3.798458071730484*^9, 3.798458072289402*^9}, {
   3.798458266066448*^9, 3.798458266172078*^9}, {3.7984583092655287`*^9, 
   3.7984583317816153`*^9}, {3.798459219269554*^9, 3.798459247002337*^9}, {
   3.798459289541997*^9, 3.798459289890643*^9}, {3.798641265387665*^9, 
   3.798641265673501*^9}, 3.798658370862525*^9, {3.798825157636222*^9, 
   3.798825158813966*^9}, 3.7989090840768557`*^9, {3.800204129769506*^9, 
   3.800204130217278*^9}, 3.803833665459732*^9, {3.8038389194499683`*^9, 
   3.803838931292375*^9}, 3.806762020893927*^9, {3.8072870598359623`*^9, 
   3.807287060574499*^9}, {3.807287190091793*^9, 3.807287201676592*^9}, {
   3.807287233317787*^9, 3.8072872353849773`*^9}, {3.807364022397052*^9, 
   3.807364022721963*^9}},
 Background->RGBColor[0.87, 0.94, 1],
 CellLabel->"In[32]:=",ExpressionUUID->"40b09f6e-2161-4081-a3d9-e0210edfdd12"],

Cell[BoxData[
 TemplateBox[{
  "InterpolatingFunction", "dmval", 
   "\"Input value \\!\\(\\*RowBox[{\\\"{\\\", \\\"0.002042857142857143`\\\", \
\\\"}\\\"}]\\) lies outside the range of data in the interpolating function. \
Extrapolation will be used.\"", 2, 32, 5, 28781789068939686094, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{{3.8002041261836233`*^9, 3.800204130597768*^9}, 
   3.800204235568879*^9, 3.800217018431217*^9, 3.800290697876113*^9, 
   3.800290742654623*^9, 3.800734834726472*^9, 3.8007354533905993`*^9, 
   3.800735597753367*^9, 3.800735734670623*^9, 3.800735947999083*^9, 
   3.8037450639965897`*^9, 3.80383366591251*^9, 3.8038377429066668`*^9, 
   3.803837851112463*^9, 3.80383792455536*^9, 3.803838163469171*^9, {
   3.803838919923072*^9, 3.803838931688178*^9}, 3.803842612807927*^9, {
   3.806762015160117*^9, 3.8067620211700478`*^9}, 3.8067621174891243`*^9, 
   3.806762372891423*^9, 3.8067626289392147`*^9, 3.806768311291731*^9, 
   3.80677012214312*^9, {3.80728705669016*^9, 3.807287060993319*^9}, {
   3.807287190456566*^9, 3.807287202100485*^9}, 3.807287235837326*^9, 
   3.8072880754220448`*^9, {3.807364014841529*^9, 3.807364023359212*^9}, 
   3.807370638817196*^9, 3.8073708224435987`*^9, 3.80737363791899*^9},
 CellLabel->
  "During evaluation of \
In[32]:=",ExpressionUUID->"fb299938-72f3-4070-901c-e3ba8a314b25"],

Cell[BoxData[
 GraphicsBox[{{{}, {}, 
    TagBox[
     {GrayLevel[0], Thickness[0.015], Opacity[1.], LineBox[CompressedData["
1:eJwdl3k01e3XxsmQCplDkjLUkUKhEu5dpCKZz/mipOmhROYplSQyJhJFGStp
IByHg3M7AweZQjyFZHii0VAyhZ/3/WOvvfZa11r7Wmt//rj2ptOXbM6t4OHh
GVqu/+ubby/kPlJkGvUsXRfRuN+BaEKkjR5umWj1k7ahh2ntiBn0Km+rWyG6
rZnawqx4i5L1ho+LJNDQ0/TE1JjZNlSn5e0q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dy3zuq0/Sc+iEW/25ijk/UcAN9K59O7rRuwZ
sODZNULAnPqZ+dcb3mD6ZT2m0FcCzspvsbK6+wYLXr8kue87AdPxfMfeyTZh
68j8cx4/CThquH7L9vwmnBE7QMscX+ZXqXNq8WgzHk2UX90+SUC0lYHWvHgL
1rlne5x/apl3mwH3wqUWHJYe90pvmoDz5K2ZdmvbcFNWLc/5WQLyJmMVKyvb
8Lonizbp8wSkwOCidfRbfPr57sfNCwRc55tc7RLajl8VeU0vLREwtvj//yH+
HzVO7uI=
       "]]},
     Annotation[#, "Charting`Private`Tag$10477#1"]& ]}, {}},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->{True, True},
  AxesLabel->{None, None},
  AxesOrigin->{0, 0},
  DisplayFunction->Identity,
  Frame->{{True, True}, {True, True}},
  FrameLabel->{{
     FormBox[
     "\"\\!\\(\\*SubscriptBox[\\\"\\\\\\\"\[CapitalDelta]E\\\\\\\"\\\", \
\\\"\\\\\\\"Pr\\\\\\\"\\\"]\\) -\\!\\(\\*SubscriptBox[\\\"\\\\\\\"\
\[CapitalDelta]E\\\\\\\"\\\", \\\"\\\\\\\"Nd\\\\\\\"\\\"]\\)  (V)\"", 
      TraditionalForm], None}, {
     FormBox["\"mol% Nd in cathode\"", TraditionalForm], None}},
  FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}},
  GridLines->{Automatic, Automatic},
  GridLinesStyle->Directive[
    GrayLevel[0.5, 0.4]],
  ImagePadding->All,
  ImageSize->700,
  LabelStyle->Directive[Bold, 
    GrayLevel[0], Large],
  Method->{
   "DefaultBoundaryStyle" -> Automatic, 
    "DefaultGraphicsInteraction" -> {
     "Version" -> 1.2, "TrackMousePosition" -> {True, False}, 
      "Effects" -> {
       "Highlight" -> {"ratio" -> 2}, "HighlightPoint" -> {"ratio" -> 2}, 
        "Droplines" -> {
         "freeformCursorMode" -> True, 
          "placement" -> {"x" -> "All", "y" -> "None"}}}}, "DefaultMeshStyle" -> 
    AbsolutePointSize[6], "ScalingFunctions" -> None, 
    "CoordinatesToolOptions" -> {"DisplayFunction" -> ({
        (Identity[#]& )[
         Part[#, 1]], 
        (Identity[#]& )[
         Part[#, 2]]}& ), "CopiedValueFunction" -> ({
        (Identity[#]& )[
         Part[#, 1]], 
        (Identity[#]& )[
         Part[#, 2]]}& )}},
  PlotRange->{{0, 100}, {-0.30622388190384603`, 0.30622388190385913`}},
  PlotRangeClipping->True,
  PlotRangePadding->{{
     Scaled[0.02], 
     Scaled[0.02]}, {
     Scaled[0.05], 
     Scaled[0.05]}},
  Ticks->{Automatic, Automatic}]], "Output",
 CellChangeTimes->{
  3.798209929204777*^9, 3.7982101634381943`*^9, 3.798210663444377*^9, 
   3.798294090946785*^9, 3.79838063445934*^9, 3.7983806727879963`*^9, {
   3.798380744977456*^9, 3.798380761062786*^9}, 3.798380860436965*^9, 
   3.7983810281040363`*^9, 3.798381955242652*^9, 3.798382093232675*^9, {
   3.798382345680155*^9, 3.7983823723178663`*^9}, {3.798386837939026*^9, 
   3.798386853963419*^9}, {3.798386892575157*^9, 3.798386908349679*^9}, 
   3.798387684462516*^9, {3.798389631768532*^9, 3.798389674332963*^9}, {
   3.798389726441392*^9, 3.798389788963286*^9}, {3.7983899139856453`*^9, 
   3.79838994203061*^9}, {3.798390774341236*^9, 3.7983908290705423`*^9}, {
   3.798398761210829*^9, 3.798398787096634*^9}, {3.798399462753471*^9, 
   3.79839948015448*^9}, 3.798399520963778*^9, 3.798458062659966*^9, 
   3.7984581246094437`*^9, {3.798458263119371*^9, 3.798458363613961*^9}, 
   3.798458755896112*^9, {3.79845881518489*^9, 3.7984588635048437`*^9}, {
   3.798458909581514*^9, 3.7984589257328587`*^9}, {3.79845922153985*^9, 
   3.798459247410432*^9}, 3.79845929114653*^9, 3.7984693878613653`*^9, 
   3.798469435362995*^9, 3.7984696570130587`*^9, 3.798470014645235*^9, {
   3.7984700508426943`*^9, 3.798470079852186*^9}, 3.798470402287984*^9, 
   3.7984706496111*^9, 3.798472171086153*^9, 3.7984727615786963`*^9, 
   3.798473130954995*^9, 3.7984777824193077`*^9, 3.798477973446528*^9, 
   3.7984781190924463`*^9, {3.798641258927998*^9, 3.798641266021158*^9}, 
   3.7986413719714413`*^9, 3.798643782146213*^9, 3.798643902863634*^9, 
   3.7986583713094*^9, 3.798658409119432*^9, 3.7986592217069883`*^9, 
   3.798818385768404*^9, {3.798818599689588*^9, 3.7988186247999067`*^9}, 
   3.798825159802229*^9, {3.798909082222439*^9, 3.79890908442526*^9}, 
   3.798909293337228*^9, 3.798910891959606*^9, 3.8001239167357483`*^9, 
   3.8002033559536953`*^9, {3.800204126313098*^9, 3.800204130609213*^9}, 
   3.800204235604624*^9, 3.80021701844213*^9, 3.8002906979247503`*^9, 
   3.8002907426964912`*^9, 3.800734834848097*^9, 3.800735453414452*^9, 
   3.800735597766735*^9, 3.800735734682933*^9, 3.8007359480209417`*^9, 
   3.803745064091672*^9, 3.8038336659709*^9, 3.803837742917922*^9, 
   3.8038378511249638`*^9, 3.803837924566114*^9, 3.803838163481988*^9, {
   3.80383891996236*^9, 3.8038389317314653`*^9}, 3.803842612818688*^9, {
   3.806762015338191*^9, 3.806762021205352*^9}, 3.806762117495388*^9, 
   3.806762372916391*^9, 3.806762628958452*^9, 3.806768311318232*^9, 
   3.806770122167046*^9, {3.8072870567894583`*^9, 3.8072870610236187`*^9}, {
   3.8072871904856653`*^9, 3.807287202133607*^9}, 3.8072872358631287`*^9, 
   3.807288075446945*^9, {3.807364014870274*^9, 3.807364023395933*^9}, 
   3.807370638958762*^9, 3.8073708224680033`*^9, 3.807373637926879*^9},
 CellLabel->"Out[32]=",ExpressionUUID->"623a7cac-b1be-4c44-8320-ad5c6400f2ed"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Step 3: Interpreting ESD", "Section",
 CellChangeTimes->{{3.7982106724947653`*^9, 
  3.798210676807526*^9}},ExpressionUUID->"c67f9385-dab5-465e-a3d7-\
094699723805"],

Cell["\<\
This section is intended for comparing ESD\[CloseCurlyQuote]s to experimental \
data. It also takes one input: the measured alloy concentration. 
Likely you will obtain data from ICP or EDS that will have a list of metals. \
You will need to re-normalize this to only contain the two (or three, if you \
have an extra cathode element) elements involved in the creation of ESD. \
\>", "Text",
 CellChangeTimes->{{3.798210686153949*^9, 3.798210706052946*^9}, {
  3.79821075066754*^9, 3.7982108032405977`*^9}, {3.798210902174184*^9, 
  3.798210902535109*^9}, {3.7982109454867897`*^9, 3.798210980067832*^9}, {
  3.7982115871272*^9, 3.798211631841242*^9}, {3.798211713738723*^9, 
  3.7982117467433147`*^9}, {3.798211807692999*^9, 
  3.7982118088271008`*^9}},ExpressionUUID->"211d7850-09ce-42a9-95ec-\
02d21bc54a38"],

Cell[TextData[{
 "If you have only two elements, then you should input the mol% of metal B. \
(Least noble, most reactive).\n\nIf you have a third element, then you should \
input the mol% of the metal ",
 StyleBox["not fixed by the pseudobinary.",
  FontSlant->"Italic"],
 " In the Fe-Cu-C example above, where the concetnration of C is tied to Fe, \
you should input the mol% of Cu. "
}], "Text",
 CellChangeTimes->{{3.7976111055655622`*^9, 3.797611105892272*^9}, {
  3.797686548448127*^9, 3.797686617672867*^9}, {3.798202075698636*^9, 
  3.798202078401503*^9}, {3.798211757552154*^9, 3.7982118601189957`*^9}, {
  3.798211915261085*^9, 
  3.798211932500101*^9}},ExpressionUUID->"ab46d4fd-3e51-40f3-8e51-\
88185b3a1de5"],

Cell[CellGroupData[{

Cell[BoxData["EdiagramCompare"], "Input",
 CellChangeTimes->{{3.798380691603181*^9, 3.7983806924280376`*^9}, {
  3.798459236303035*^9, 3.79845923683785*^9}},
 CellLabel->"In[38]:=",ExpressionUUID->"4e0cdbdd-b786-454c-841d-ba6cfbd3b8c9"],

Cell[BoxData[
 TemplateBox[{
  "InterpolatingFunction", "dmval", 
   "\"Input value \\!\\(\\*RowBox[{\\\"{\\\", \\\"0.002042857142857143`\\\", \
\\\"}\\\"}]\\) lies outside the range of data in the interpolating function. \
Extrapolation will be used.\"", 2, 38, 8, 28781789068939686094, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{
  3.798643784622422*^9, 3.798643984558301*^9, 3.7986582587255163`*^9, 
   3.798658293493186*^9, 3.798658354697534*^9, 3.798659225239064*^9, 
   3.798659638545355*^9, {3.7988183942003193`*^9, 3.798818424092939*^9}, 
   3.7988186280093403`*^9, 3.798825176982141*^9, 3.7989093012153473`*^9, 
   3.798910895584889*^9, 3.798910998879306*^9, 3.798911170425631*^9, 
   3.800123916882285*^9, 3.800203356066556*^9, 3.800204137135233*^9, 
   3.800204238364626*^9, 3.800217021717161*^9, 3.800290702939537*^9, 
   3.800290745050996*^9, 3.8007348383510647`*^9, 3.80073545706488*^9, 
   3.8007356012015553`*^9, 3.800735950933708*^9, 3.8037450702153482`*^9, 
   3.803834368469413*^9, 3.8038377469046507`*^9, {3.8038378543492107`*^9, 
   3.803837883394013*^9}, 3.8038403438807697`*^9, 3.806762030028957*^9, 
   3.8067621196968403`*^9, 3.8067623751619883`*^9, 3.806762891085586*^9, 
   3.806768316138865*^9, 3.8067683535897207`*^9, 3.8067701252990313`*^9, 
   3.806770160780507*^9, 3.8067702159108353`*^9, 3.80677024795752*^9, 
   3.806770375869754*^9, 3.8073711675809813`*^9, 3.807373248489027*^9, 
   3.807373640776469*^9, 3.807374238380393*^9},
 CellLabel->
  "During evaluation of \
In[38]:=",ExpressionUUID->"6bb7cbef-c08c-45b0-b504-b94d670e514e"],

Cell[BoxData[
 GraphicsBox[{{{}, {}, 
    TagBox[
     {GrayLevel[0], Thickness[0.015], Opacity[1.], LineBox[CompressedData["
1:eJwdl3k01e3XxsmQCplDkjLUkUKhEu5dpCKZz/mipOmhROYplSQyJhJFGStp
IByHg3M7AweZQjyFZHii0VAyhZ/3/WOvvfZa11r7Wmt//rj2ptOXbM6t4OHh
GVqu/+ubby/kPlJkGvUsXRfRuN+BaEKkjR5umWj1k7ahh2ntiBn0Km+rWyG6
rZnawqx4i5L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
YxOEBgjYb34nvnS8AXe5xzZ6Dy3zuq0/Sc+iEW/25ijk/UcAN9K59O7rRuwZ
sODZNULAnPqZ+dcb3mD6ZT2m0FcCzspvsbK6+wYLXr8kue87AdPxfMfeyTZh
68j8cx4/CThquH7L9vwmnBE7QMscX+ZXqXNq8WgzHk2UX90+SUC0lYHWvHgL
1rlne5x/apl3mwH3wqUWHJYe90pvmoDz5K2ZdmvbcFNWLc/5WQLyJmMVKyvb
8Lonizbp8wSkwOCidfRbfPr57sfNCwRc55tc7RLajl8VeU0vLREwtvj//yH+
HzVO7uI=
       "]]},
     Annotation[#, "Charting`Private`Tag$12173#1"]& ]}, {}},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->{True, True},
  AxesLabel->{None, None},
  AxesOrigin->{0, 0},
  DisplayFunction->Identity,
  Epilog->{
    PointSize[0.06], 
    RGBColor[1, 0, 0], 
    PointBox[{80, -0.05267963658010872}]},
  Frame->{{True, True}, {True, True}},
  FrameLabel->{{
     FormBox[
     "\"\\!\\(\\*SubscriptBox[\\\"\\\\\\\"\[CapitalDelta]E\\\\\\\"\\\", \
\\\"\\\\\\\"Pr\\\\\\\"\\\"]\\) -\\!\\(\\*SubscriptBox[\\\"\\\\\\\"\
\[CapitalDelta]E\\\\\\\"\\\", \\\"\\\\\\\"Nd\\\\\\\"\\\"]\\)  (V)\"", 
      TraditionalForm], None}, {
     FormBox["\"mol% Nd in cathode   \"", TraditionalForm], None}},
  FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}},
  GridLines->{Automatic, Automatic},
  GridLinesStyle->Directive[
    GrayLevel[0.5, 0.4]],
  ImagePadding->All,
  ImageSize->700,
  LabelStyle->Directive[Bold, 
    GrayLevel[0], Large],
  Method->{
   "DefaultBoundaryStyle" -> Automatic, 
    "DefaultGraphicsInteraction" -> {
     "Version" -> 1.2, "TrackMousePosition" -> {True, False}, 
      "Effects" -> {
       "Highlight" -> {"ratio" -> 2}, "HighlightPoint" -> {"ratio" -> 2}, 
        "Droplines" -> {
         "freeformCursorMode" -> True, 
          "placement" -> {"x" -> "All", "y" -> "None"}}}}, "DefaultMeshStyle" -> 
    AbsolutePointSize[6], "ScalingFunctions" -> None, 
    "CoordinatesToolOptions" -> {"DisplayFunction" -> ({
        (Identity[#]& )[
         Part[#, 1]], 
        (Identity[#]& )[
         Part[#, 2]]}& ), "CopiedValueFunction" -> ({
        (Identity[#]& )[
         Part[#, 1]], 
        (Identity[#]& )[
         Part[#, 2]]}& )}},
  PlotRange->{{0, 100}, {-0.30622388190384603`, 0.30622388190385913`}},
  PlotRangeClipping->True,
  PlotRangePadding->{{
     Scaled[0.02], 
     Scaled[0.02]}, {
     Scaled[0.05], 
     Scaled[0.05]}},
  Ticks->{Automatic, Automatic}]], "Output",
 CellChangeTimes->{
  3.798212580264181*^9, {3.7983806811775293`*^9, 3.798380692826264*^9}, 
   3.798380756881681*^9, 3.798382354005206*^9, 3.798459237238426*^9, 
   3.7984693841953087`*^9, 3.7984727717420893`*^9, 3.798473134071404*^9, 
   3.798477787152851*^9, 3.7984778760666924`*^9, 3.798478125519615*^9, 
   3.7986437846808023`*^9, 3.798643984717292*^9, 3.798658258911285*^9, 
   3.798658293637888*^9, 3.798658354845541*^9, 3.798659225254434*^9, 
   3.798659638601019*^9, {3.798818394249391*^9, 3.7988184241468563`*^9}, 
   3.798818628022538*^9, 3.798825177148273*^9, 3.798909301226378*^9, 
   3.798910895598846*^9, 3.7989109989338818`*^9, 3.798911170440919*^9, 
   3.800123917014537*^9, 3.800203356107934*^9, 3.8002041371776867`*^9, 
   3.800204238375842*^9, 3.800217021728956*^9, 3.800290702952468*^9, 
   3.800290745063982*^9, 3.8007348384069967`*^9, 3.80073545708491*^9, 
   3.800735601216473*^9, 3.800735950947301*^9, 3.8037450702310658`*^9, 
   3.803834368481152*^9, 3.803837746918795*^9, {3.803837854393742*^9, 
   3.8038378834051647`*^9}, 3.803840343926771*^9, 3.8067620300393887`*^9, 
   3.806762119721778*^9, 3.806762375187011*^9, 3.806762891115086*^9, 
   3.8067683161459017`*^9, 3.8067683535964622`*^9, 3.8067701253068047`*^9, 
   3.806770160787278*^9, 3.806770215918795*^9, 3.8067702479812737`*^9, 
   3.806770375898864*^9, 3.8073711676122313`*^9, 3.807373248496008*^9, 
   3.807373640785153*^9, 3.8073742383868217`*^9},
 CellLabel->"Out[38]=",ExpressionUUID->"98e85bcc-a6a8-4778-8e5f-c0301aab6df7"]
}, Open  ]],

Cell["\<\
If you would like to know the exact values, then run the following function:\
\>", "Text",
 CellChangeTimes->{{3.7982126334032183`*^9, 3.798212639400374*^9}, {
  3.798212941704672*^9, 
  3.7982129602805862`*^9}},ExpressionUUID->"646517a9-dd86-4289-a353-\
cfde9fd5b726"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"readtext", "[", "mA", "]"}], "-", 
  RowBox[{"readtext", "[", "mB", "]"}]}]], "Input",
 CellLabel->"In[45]:=",ExpressionUUID->"f65e02d8-659c-4851-9f41-0a7bf70799dd"],

Cell[BoxData["0.00972030303528637`"], "Output",
 CellChangeTimes->{3.806770180052012*^9, 3.807287217749917*^9, 
  3.807371029132687*^9, 3.807374360384008*^9, 3.807374433333097*^9, 
  3.8073744750081053`*^9},
 CellLabel->"Out[45]=",ExpressionUUID->"939dc15e-caad-4ae4-82e9-addadd617b81"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["EdiagramQuant"], "Input",
 CellChangeTimes->{{3.798213011950177*^9, 3.7982130184187593`*^9}, {
  3.798459262948945*^9, 3.7984592636591187`*^9}, {3.798643802124751*^9, 
  3.79864380269068*^9}, {3.80073560394248*^9, 3.800735604522559*^9}, {
  3.806770273487134*^9, 3.8067702740539083`*^9}},
 CellLabel->"In[46]:=",ExpressionUUID->"90ed716f-d922-4d69-ac76-faa2729247ff"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"80", ",", 
   RowBox[{"-", "0.05267963658010872`"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.7982130191361628`*^9, 3.798459264011446*^9, 3.798472774796359*^9, 
   3.798477790816658*^9, 3.798477881033012*^9, 3.7984781312522078`*^9, 
   3.798643803107049*^9, 3.79864400604568*^9, 3.798658864828436*^9, 
   3.7986595892251587`*^9, 3.798818404667068*^9, 3.798818630831292*^9, 
   3.798825203256291*^9, 3.798910900422484*^9, 3.79891117266117*^9, 
   3.800123917031744*^9, 3.800203356120533*^9, 3.800204141790975*^9, 
   3.800204241765437*^9, 3.8002907052446136`*^9, 3.800290747416565*^9, 
   3.800734842325849*^9, 3.800735459447431*^9, 3.800735604841772*^9, 
   3.80073573746841*^9, 3.800735818117105*^9, 3.8007359542195597`*^9, 
   3.803745084926856*^9, 3.803833720987462*^9, 3.803837751620092*^9, {
   3.803837869179487*^9, 3.8038378859196157`*^9}, 3.803837927385706*^9, 
   3.803838167560714*^9, 3.8038387373061523`*^9, 3.8067620355726757`*^9, 
   3.8067623781175337`*^9, 3.8067625204699993`*^9, 3.806762632311796*^9, 
   3.806762720610503*^9, 3.8067628851547003`*^9, 3.806762964987495*^9, 
   3.806763064589871*^9, 3.806763204429845*^9, 3.806763347000963*^9, 
   3.8067634465298767`*^9, 3.8067683563708878`*^9, 3.806770128934029*^9, 
   3.806770163123453*^9, {3.806770219674148*^9, 3.806770243450128*^9}, 
   3.8067702744763308`*^9, {3.806770337186789*^9, 3.806770366674821*^9}, 
   3.807371162146873*^9, 3.80737353398798*^9, 3.807373643504442*^9, 
   3.807374537034223*^9},
 CellLabel->"Out[46]=",ExpressionUUID->"a09611b4-842a-45ce-adef-ef2ad8d25e45"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Step 4: Estimating Activity", "Section",
 CellChangeTimes->{{3.797600792077484*^9, 
  3.797600810502365*^9}},ExpressionUUID->"ab3817be-b34b-4027-b15d-\
880404cd3df1"],

Cell[TextData[{
 "The final step in ESD analysis is estimating the activities of the \
electrolyte based on the measured difference in chemical potential. Because \
there is no convential reference state we can fix our measurements to, we \
will use a ",
 StyleBox["relative pseudobinary ",
  FontSlant->"Italic"],
 "standard state. "
}], "Text",
 CellChangeTimes->{{3.7976958028571672`*^9, 3.797695805127437*^9}, {
  3.7982130308943787`*^9, 3.798213042897908*^9}, {3.798213224807543*^9, 
  3.79821325302631*^9}, {3.798213312440571*^9, 3.798213333348465*^9}, {
  3.798213402992487*^9, 3.79821343049611*^9}, {3.798213490200307*^9, 
  3.798213503693758*^9}},ExpressionUUID->"ef424e6d-c2a4-44ed-ac9b-\
8fc7c509dd19"],

Cell[CellGroupData[{

Cell["Relative Pseudobinary Standard State", "Subsection",
 CellChangeTimes->{{3.798213456787898*^9, 
  3.7982134885005074`*^9}},ExpressionUUID->"60d1dfc6-2182-49b7-9b79-\
730abbedba98"],

Cell[TextData[{
 "In this standard state, activity is defined as:\n",
 Cell[BoxData[
  FormBox[
   SubscriptBox["a", "i"], TraditionalForm]],ExpressionUUID->
  "7cef7498-4176-49cb-a053-26345e12e016"],
 " = ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["\[Rho]", "i"], TraditionalForm]],ExpressionUUID->
  "0eede7ff-d7d3-4a34-870d-4ec36536fa01"],
 "*",
 Cell[BoxData[
  FormBox[
   SubscriptBox["x", "i"], TraditionalForm]],ExpressionUUID->
  "eefe274d-3e41-4fe4-bba9-5d19deeda477"],
 ", where ",
 StyleBox["i ",
  FontSlant->"Italic"],
 "is one of the two species fixed in the pseudobinary. \n\nFor metal A, \n",
 Cell[BoxData[
  FormBox[
   SubscriptBox["a", "A"], TraditionalForm]],ExpressionUUID->
  "6071ed12-25e3-4776-aed0-1071266d9908"],
 " = ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["\[Rho]", "A"], TraditionalForm]],ExpressionUUID->
  "ad7fc8f4-3e08-48c9-8fa6-8786417d4dea"],
 "*",
 Cell[BoxData[
  FormBox[
   SubscriptBox["x", "A"], TraditionalForm]],ExpressionUUID->
  "ad45abce-92cd-442b-9d71-ba3501fc631b"],
 ", and \[Rho] = 1. \n\nFor metal B,\n",
 Cell[BoxData[
  FormBox[
   SubscriptBox["a", "B"], TraditionalForm]],ExpressionUUID->
  "a68d0cb4-890f-452f-8dd4-b25182650b30"],
 " = ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["\[Rho]", "B"], TraditionalForm]],ExpressionUUID->
  "a20d18b7-6c65-48c5-b945-1a233218825e"],
 "*",
 Cell[BoxData[
  FormBox[
   SubscriptBox["x", "B"], TraditionalForm]],ExpressionUUID->
  "9c454318-13a2-4921-b953-044502f7b854"],
 ", and \[Rho] /= 1. \n\[LineSeparator]Thus, the activity of B varies \
relative to the activity of A. "
}], "Text",
 CellChangeTimes->{{3.798213475413027*^9, 3.798213757420814*^9}, 
   3.800123470004738*^9},ExpressionUUID->"914909b3-c86f-46b4-a1ad-\
8692cc50057d"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Calculating Deviations from Activity", "Subsection",
 CellChangeTimes->{{3.798213776580378*^9, 
  3.7982137812180567`*^9}},ExpressionUUID->"00717a8f-6661-427f-8109-\
ab559a5a6942"],

Cell[CellGroupData[{

Cell[BoxData["EdiagramActivity"], "Input",
 CellChangeTimes->{{3.7984690018223352`*^9, 3.7984690038255987`*^9}, {
  3.80021858272952*^9, 3.800218585000758*^9}},
 CellLabel->"In[47]:=",ExpressionUUID->"85b6bb6a-eac9-45a7-b52b-26dff72c80ff"],

Cell[BoxData[
 TemplateBox[{
  "InterpolatingFunction", "dmval", 
   "\"Input value \\!\\(\\*RowBox[{\\\"{\\\", \\\"0.002042857142857143`\\\", \
\\\"}\\\"}]\\) lies outside the range of data in the interpolating function. \
Extrapolation will be used.\"", 2, 47, 9, 28781789068939686094, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{
  3.798644010969013*^9, {3.798653457871398*^9, 3.798653479059804*^9}, 
   3.798653533551512*^9, 3.798818429304511*^9, 3.79881863447943*^9, {
   3.798818683675405*^9, 3.7988187032210503`*^9}, 3.7988187824807653`*^9, 
   3.798825236095035*^9, 3.798910906137416*^9, 3.798911001378111*^9, 
   3.798911034872244*^9, 3.7989111752218924`*^9, 3.7989112495653553`*^9, 
   3.800123917071146*^9, 3.8002033561408377`*^9, 3.800204145892218*^9, {
   3.80020424457934*^9, 3.800204267038323*^9}, 3.800204303988934*^9, 
   3.800204911730481*^9, 3.800217025826705*^9, 3.8002170702442703`*^9, 
   3.800217610379517*^9, 3.8002180913996553`*^9, 3.800218323109498*^9, 
   3.800218357634454*^9, 3.800218428756362*^9, 3.800218585388853*^9, 
   3.80021908483989*^9, 3.800290710154327*^9, {3.800290750533556*^9, 
   3.800290775934458*^9}, 3.8007348459296007`*^9, 3.800735249351544*^9, {
   3.800735367652479*^9, 3.800735395627569*^9}, 3.800735464734825*^9, 
   3.8007356103600817`*^9, 3.80073582062498*^9, 3.800735957617485*^9, 
   3.800736029210444*^9, 3.803745089243737*^9, 3.8038337262725887`*^9, 
   3.80383411963671*^9, 3.8038343716497517`*^9, 3.8038348096165257`*^9, 
   3.80383793277833*^9, 3.803837996902946*^9, 3.803838170318038*^9, 
   3.803838739747198*^9, 3.803838965701292*^9, 3.80384052120865*^9, 
   3.80384056248905*^9, 3.803840779791542*^9, 3.803840896668041*^9, 
   3.803840943372443*^9, 3.803842421901655*^9, {3.80384261767957*^9, 
   3.8038426467047243`*^9}, 3.803842680898278*^9, 3.803843137585924*^9, 
   3.803843271064156*^9, 3.8067620811139793`*^9, 3.806762122537106*^9, 
   3.806762450440333*^9, 3.806762766078306*^9, 3.8067628113037453`*^9, 
   3.806762996543331*^9, 3.806763154627213*^9, 3.80676836147025*^9, 
   3.806768701677454*^9, 3.807373785822647*^9, 3.807374545710822*^9},
 CellLabel->
  "During evaluation of \
In[47]:=",ExpressionUUID->"92653f04-563e-4a0a-bfc0-7352463a6a9b"],

Cell[BoxData[
 TagBox[
  GraphicsBox[{{{{}, {}, 
      TagBox[
       {GrayLevel[0], Thickness[0.015], Opacity[1.], LineBox[CompressedData["
1:eJwdl3k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k4dDdQTkf9YUmButw6nasgcOvyGA7Hyx+ooFFw/qWd8NaV7WK03Ifg/n4h0G
MZ9ftBIg+N24sYDOxXWmf2PEOwlgCUVc3LOzHksc1e0z7lqexUnmAT71+IS1
p2bAvwTIJk9qHCirx7+dPnV86F2+T7/JhtwjDRhOyamJ9BOgKvGXE/WgAcf+
YxOEBgjYb34nvnS8AXe5xzZ6Dy3zuq0/Sc+iEW/25ijk/UcAN9K59O7rRuwZ
sODZNULAnPqZ+dcb3mD6ZT2m0FcCzspvsbK6+wYLXr8kue87AdPxfMfeyTZh
68j8cx4/CThquH7L9vwmnBE7QMscX+ZXqXNq8WgzHk2UX90+SUC0lYHWvHgL
1rlne5x/apl3mwH3wqUWHJYe90pvmoDz5K2ZdmvbcFNWLc/5WQLyJmMVKyvb
8Lonizbp8wSkwOCidfRbfPr57sfNCwRc55tc7RLajl8VeU0vLREwtvj//yH+
HzVO7uI=
         "]]},
       Annotation[#, "Charting`Private`Tag$17653#1"]& ]}, {}}, InsetBox[
     FrameBox[
      StyleBox[
       TagBox[GridBox[{
          {"\<\"\\!\\(\\*SubscriptBox[\\\"\\\\\\\"a\\\\\\\"\\\", \\\"\\\\\\\"\
\\\\\\\\!\\\\\\\\(\\\\\\\\*SubscriptBox[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\"Nd\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\", \
\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\\)\\\\\\\\!\\\\\\\\(\\\\\\\\*\
SubscriptBox[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"O\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\"3\\\\\\\\\\\\\\\"]\\\\\\\\)\
\\\\\\\"\\\"]\\)\"\>", "\<\"=\"\>", "5.337400000000001`"},
          {"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[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\"Pr\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\", \
\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\\)\\\\\\\\!\\\\\\\\(\\\\\\\\*\
SubscriptBox[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"O\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\"3\\\\\\\\\\\\\\\"]\\\\\\\\)\
\\\\\\\"\\\"]\\)\"\>", "\<\"=\"\>", "0.2`"}
         },
         AutoDelete->False,
         GridBoxItemSize->{
          "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
        "Grid"],
       StripOnInput->False,
       LineColor->GrayLevel[0],
       FrontFaceColor->GrayLevel[0],
       BackFaceColor->GrayLevel[0],
       GraphicsColor->GrayLevel[0],
       FontFamily->"Helvetica",
       FontSize->Large,
       FontWeight->Bold,
       FontColor->GrayLevel[0]],
      Background->GrayLevel[1],
      StripOnInput->False], Scaled[{0.8, 0.7}], ImageScaled[{0.5, 0.5}],
     BaseStyle->{FontSize -> Larger},
     FormatType->StandardForm]},
   AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
   Axes->{True, True},
   AxesLabel->{None, None},
   AxesOrigin->{0, 0},
   DisplayFunction->Identity,
   Epilog->{
     PointSize[0.06], 
     RGBColor[1, 0, 0], 
     PointBox[{80, -0.05267963658010872}]},
   Frame->{{True, True}, {True, True}},
   FrameLabel->{{
      FormBox[
      "\"\\!\\(\\*SubscriptBox[\\\"\\\\\\\"\[CapitalDelta]E\\\\\\\"\\\", \\\"\
\\\\\\\"Pr\\\\\\\"\\\"]\\) \
-\\!\\(\\*SubscriptBox[\\\"\\\\\\\"\[CapitalDelta]E\\\\\\\"\\\", \
\\\"\\\\\\\"Nd\\\\\\\"\\\"]\\)  (V)\"", TraditionalForm], None}, {
      FormBox["\"mol% Nd in cathode  \"", TraditionalForm], None}},
   FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}},
   GridLines->{Automatic, Automatic},
   GridLinesStyle->Directive[
     GrayLevel[0.5, 0.4]],
   ImagePadding->All,
   ImageSize->700,
   LabelStyle->Directive[Bold, 
     GrayLevel[0], Large, FontFamily -> "Helvetica"],
   Method->{
    "DefaultBoundaryStyle" -> Automatic, 
     "DefaultGraphicsInteraction" -> {
      "Version" -> 1.2, "TrackMousePosition" -> {True, False}, 
       "Effects" -> {
        "Highlight" -> {"ratio" -> 2}, "HighlightPoint" -> {"ratio" -> 2}, 
         "Droplines" -> {
          "freeformCursorMode" -> True, 
           "placement" -> {"x" -> "All", "y" -> "None"}}}}, 
     "DefaultMeshStyle" -> AbsolutePointSize[6], "ScalingFunctions" -> None, 
     "CoordinatesToolOptions" -> {"DisplayFunction" -> ({
         (Identity[#]& )[
          Part[#, 1]], 
         (Identity[#]& )[
          Part[#, 2]]}& ), "CopiedValueFunction" -> ({
         (Identity[#]& )[
          Part[#, 1]], 
         (Identity[#]& )[
          Part[#, 2]]}& )}},
   PlotRange->{{0, 100}, {-0.30622388190384603`, 0.30622388190385913`}},
   PlotRangeClipping->True,
   PlotRangePadding->{{
      Scaled[0.02], 
      Scaled[0.02]}, {
      Scaled[0.05], 
      Scaled[0.05]}},
   Ticks->{Automatic, Automatic}],
  InterpretTemplate[Legended[
    Graphics[{{{{}, {}, 
        Annotation[{
          Directive[
           Opacity[1.], 
           AbsoluteThickness[1.6], 
           GrayLevel[0], 
           Thickness[0.015]], 
          Line[CompressedData["
1:eJwdl3k01e3XxsmQCplDkjLUkUKhEu5dpCKZz/mipOmhROYplSQyJhJFGStp
IByHg3M7AweZQjyFZHii0VAyhZ/3/WOvvfZa11r7Wmt//rj2ptOXbM6t4OHh
GVqu/+ubby/kPlJkGvUsXRfRuN+BaEKkjR5umWj1k7ahh2ntiBn0Km+rWy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gKvGXE/WgAcf+
YxOEBgjYb34nvnS8AXe5xzZ6Dy3zuq0/Sc+iEW/25ijk/UcAN9K59O7rRuwZ
sODZNULAnPqZ+dcb3mD6ZT2m0FcCzspvsbK6+wYLXr8kue87AdPxfMfeyTZh
68j8cx4/CThquH7L9vwmnBE7QMscX+ZXqXNq8WgzHk2UX90+SUC0lYHWvHgL
1rlne5x/apl3mwH3wqUWHJYe90pvmoDz5K2ZdmvbcFNWLc/5WQLyJmMVKyvb
8Lonizbp8wSkwOCidfRbfPr57sfNCwRc55tc7RLajl8VeU0vLREwtvj//yH+
HzVO7uI=
           "]]}, "Charting`Private`Tag$17653#1"]}}, {}}, {
     DisplayFunction -> Identity, Ticks -> {Automatic, Automatic}, 
      AxesOrigin -> {0, 0}, 
      FrameTicks -> {{Automatic, Automatic}, {Automatic, Automatic}}, 
      GridLines -> {Automatic, Automatic}, DisplayFunction -> Identity, 
      PlotRangePadding -> {{
         Scaled[0.02], 
         Scaled[0.02]}, {
         Scaled[0.05], 
         Scaled[0.05]}}, PlotRangeClipping -> True, ImagePadding -> All, 
      DisplayFunction -> Identity, AspectRatio -> GoldenRatio^(-1), 
      Axes -> {True, True}, AxesLabel -> {None, None}, AxesOrigin -> {0, 0}, 
      DisplayFunction :> Identity, Epilog -> {
        PointSize[0.06], 
        RGBColor[1, 0, 0], 
        Point[{80, -0.05267963658010872}]}, 
      Frame -> {{True, True}, {True, True}}, 
      FrameLabel -> {{
        "\!\(\*SubscriptBox[\"\\\"\[CapitalDelta]E\\\"\", \"\\\"Pr\\\"\"]\) -\
\!\(\*SubscriptBox[\"\\\"\[CapitalDelta]E\\\"\", \"\\\"Nd\\\"\"]\)  (V)", 
         None}, {"mol% Nd in cathode  ", None}}, 
      FrameTicks -> {{Automatic, Automatic}, {Automatic, Automatic}}, 
      GridLines -> {Automatic, Automatic}, GridLinesStyle -> Directive[
        GrayLevel[0.5, 0.4]], ImageSize -> 700, LabelStyle -> 
      Directive[Bold, 
        GrayLevel[0], Large, FontFamily -> "Helvetica"], 
      Method -> {
       "DefaultBoundaryStyle" -> Automatic, 
        "DefaultGraphicsInteraction" -> {
         "Version" -> 1.2, "TrackMousePosition" -> {True, False}, 
          "Effects" -> {
           "Highlight" -> {"ratio" -> 2}, "HighlightPoint" -> {"ratio" -> 2}, 
            "Droplines" -> {
             "freeformCursorMode" -> True, 
              "placement" -> {"x" -> "All", "y" -> "None"}}}}, 
        "DefaultMeshStyle" -> AbsolutePointSize[6], "ScalingFunctions" -> 
        None, "CoordinatesToolOptions" -> {"DisplayFunction" -> ({
            (Identity[#]& )[
             Part[#, 1]], 
            (Identity[#]& )[
             Part[#, 2]]}& ), "CopiedValueFunction" -> ({
            (Identity[#]& )[
             Part[#, 1]], 
            (Identity[#]& )[
             Part[#, 2]]}& )}}, 
      PlotRange -> {{0, 100}, {-0.30622388190384603`, 0.30622388190385913`}}, 
      PlotRangeClipping -> True, PlotRangePadding -> {{
         Scaled[0.02], 
         Scaled[0.02]}, {
         Scaled[0.02], 
         Scaled[0.02]}}, Ticks -> {Automatic, Automatic}}], 
    Placed[
     Unevaluated[
      Framed[
       Style[
        Grid[{{
          "\!\(\*SubscriptBox[\"\\\"a\\\"\", \
\"\\\"\\\\!\\\\(\\\\*SubscriptBox[\\\\\\\"\\\\\\\\\\\\\\\"Nd\\\\\\\\\\\\\\\"\\\
\\\\\", \\\\\\\"2\\\\\\\"]\\\\)\\\\!\\\\(\\\\*SubscriptBox[\\\\\\\"\\\\\\\\\\\
\\\\\"O\\\\\\\\\\\\\\\"\\\\\\\", \\\\\\\"3\\\\\\\"]\\\\)\\\"\"]\)", "=", 
           5.337400000000001}, {
          "\!\(\*SubscriptBox[\"\\\"a\\\"\", \
\"\\\"\\\\!\\\\(\\\\*SubscriptBox[\\\\\\\"\\\\\\\\\\\\\\\"Pr\\\\\\\\\\\\\\\"\\\
\\\\\", \\\\\\\"2\\\\\\\"]\\\\)\\\\!\\\\(\\\\*SubscriptBox[\\\\\\\"\\\\\\\\\\\
\\\\\"O\\\\\\\\\\\\\\\"\\\\\\\", \\\\\\\"3\\\\\\\"]\\\\)\\\"\"]\)", "=", 
           0.2}, {"\!\(\*SubscriptBox[\"\\\"x\\\"\", \
\"\\\"\\\\!\\\\(\\\\*SubscriptBox[\\\\\\\"\\\\\\\\\\\\\\\"Nd\\\\\\\\\\\\\\\"\\\
\\\\\", \\\\\\\"2\\\\\\\"]\\\\)\\\\!\\\\(\\\\*SubscriptBox[\\\\\\\"\\\\\\\\\\\
\\\\\"O\\\\\\\\\\\\\\\"\\\\\\\", \\\\\\\"3\\\\\\\"]\\\\)\\\"\"]\)", "=", 
           0.8}, {"\!\(\*SubscriptBox[\"\\\"x\\\"\", \
\"\\\"\\\\!\\\\(\\\\*SubscriptBox[\\\\\\\"\\\\\\\\\\\\\\\"Pr\\\\\\\\\\\\\\\"\\\
\\\\\", \\\\\\\"2\\\\\\\"]\\\\)\\\\!\\\\(\\\\*SubscriptBox[\\\\\\\"\\\\\\\\\\\
\\\\\"O\\\\\\\\\\\\\\\"\\\\\\\", \\\\\\\"3\\\\\\\"]\\\\)\\\"\"]\)", "=", 
           0.2}}], 
        Directive[Bold, 
         GrayLevel[0], Large, FontFamily -> "Helvetica"]], Background -> 
       GrayLevel[1]]], {0.8, 0.7}, Identity]]& ],
  AutoDelete->True,
  Editable->True,
  SelectWithContents->False,
  Selectable->True]], "Output",
 CellChangeTimes->{
  3.798469004517789*^9, 3.7984727806241617`*^9, 3.7984731372046213`*^9, {
   3.798473224948145*^9, 3.798473247594352*^9}, {3.798473280947918*^9, 
   3.798473302585614*^9}, 3.798474115192607*^9, 3.7984775204062843`*^9, 
   3.798477794943089*^9, 3.798477883745945*^9, 3.798477980189068*^9, 
   3.798478133299344*^9, 3.798644011347228*^9, {3.798653458239581*^9, 
   3.798653479220636*^9}, 3.7986535341352177`*^9, 3.7988184295782967`*^9, 
   3.798818634714324*^9, {3.798818683881748*^9, 3.798818703419044*^9}, 
   3.798818782745048*^9, 3.79882523680214*^9, 3.798910906394739*^9, 
   3.7989110016030703`*^9, 3.798911035070546*^9, 3.798911175436946*^9, 
   3.7989112497938643`*^9, 3.8001239172583942`*^9, 3.800203356283502*^9, 
   3.800204145946097*^9, {3.800204244808504*^9, 3.80020426723063*^9}, 
   3.80020430417064*^9, 3.800204911913169*^9, 3.800217026018572*^9, 
   3.800217070429161*^9, 3.80021761058545*^9, 3.800218091577528*^9, 
   3.800218323289598*^9, 3.8002183578144073`*^9, 3.800218428938593*^9, 
   3.800218585605942*^9, 3.8002190850230923`*^9, 3.800290710368025*^9, {
   3.800290750768239*^9, 3.80029077612263*^9}, 3.80073484623662*^9, 
   3.8007352495806026`*^9, {3.8007353678462*^9, 3.800735395836215*^9}, 
   3.8007354649333487`*^9, 3.800735610550219*^9, 3.800735820925853*^9, 
   3.8007359578188143`*^9, 3.800736029432678*^9, 3.803745089473167*^9, 
   3.80383372662402*^9, 3.8038341198245773`*^9, 3.80383437184466*^9, 
   3.8038348098067083`*^9, 3.803837932989043*^9, 3.803837997083005*^9, 
   3.803838170506394*^9, 3.803838739937323*^9, 3.803838965894327*^9, 
   3.803840521401967*^9, 3.803840562672777*^9, 3.803840779994809*^9, 
   3.803840896861005*^9, 3.803840943551689*^9, 3.803842422110921*^9, {
   3.803842617871265*^9, 3.803842646885683*^9}, 3.803842681079155*^9, 
   3.8038431377679977`*^9, 3.803843271372541*^9, 3.8067620812781277`*^9, 
   3.806762122730585*^9, 3.806762450620193*^9, 3.8067627662661943`*^9, 
   3.806762811512919*^9, 3.8067629967283154`*^9, 3.8067631548197527`*^9, 
   3.806768361668907*^9, 3.806768701876422*^9, 3.807373786129689*^9, 
   3.807374545917441*^9},
 CellLabel->"Out[47]=",ExpressionUUID->"62603607-b448-4c0c-a14b-cf3f612b75a7"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["\[Gamma]Calc"], "Input",
 CellChangeTimes->{{3.8038337797565737`*^9, 3.803833780517521*^9}, {
  3.803836898098444*^9, 3.80383689944088*^9}, {3.806762977112927*^9, 
  3.8067629781347723`*^9}, {3.8067631462599373`*^9, 3.806763146801585*^9}, {
  3.806770340523313*^9, 3.80677034105252*^9}},
 CellLabel->"In[48]:=",ExpressionUUID->"e83bc1c5-bd00-41ea-9d47-a5e56c6362e9"],

Cell[BoxData["6.6717679130682574`"], "Output",
 CellChangeTimes->{
  3.803833781035886*^9, 3.803836900007572*^9, 3.8038379368538847`*^9, 
   3.803838179328376*^9, 3.803838743029463*^9, 3.803838968741805*^9, 
   3.803840565660389*^9, 3.803840800415822*^9, 3.803842427825204*^9, 
   3.803842619924543*^9, 3.8038431523017187`*^9, 3.803843303097353*^9, 
   3.803915228981968*^9, 3.803915274332858*^9, 3.8039154892227182`*^9, 
   3.803915734674122*^9, 3.8039159924445257`*^9, 3.8039160537120943`*^9, 
   3.80676207551178*^9, 3.806762126137637*^9, 3.806762171562014*^9, 
   3.8067624198970137`*^9, 3.806762535669579*^9, 3.8067626466190023`*^9, 
   3.806762730969534*^9, 3.806762816533843*^9, 3.806762918381145*^9, 
   3.806762979111492*^9, 3.806763147275176*^9, 3.8067632263526773`*^9, 
   3.806763402961245*^9, 3.806763461528652*^9, 3.8067683660302362`*^9, 
   3.806768709520299*^9, {3.806770341460464*^9, 3.8067703712113733`*^9}, 
   3.807373790148473*^9, 3.8073745493265963`*^9},
 CellLabel->"Out[48]=",ExpressionUUID->"e27b1dbe-b8a5-4991-a142-6ebd44229383"]
}, Open  ]],

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.806762674863717*^9, 
  3.80676267759426*^9}},ExpressionUUID->"fb0e53f0-f5a7-4105-810e-\
f92f2affe910"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{".9653", "/", ".9"}]], "Input",
 CellChangeTimes->{{3.8067624459492397`*^9, 3.80676245930016*^9}},
 CellLabel->"In[60]:=",ExpressionUUID->"2ea65a78-2a23-40d7-9307-6538e75bb2e3"],

Cell[BoxData["1.0725555555555557`"], "Output",
 CellChangeTimes->{3.80676245974406*^9},
 CellLabel->"Out[60]=",ExpressionUUID->"41691a47-786a-4ad1-9671-3d0607712d01"]
}, Open  ]],

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.8039155613109217`*^9, 
  3.8039155625112333`*^9}},ExpressionUUID->"f672c13b-769c-4ac4-a670-\
77d8bafea84a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"activityCalc", "\[IndentingNewLine]"}]], "Input",
 CellChangeTimes->{{3.8038379490049953`*^9, 3.803837949884837*^9}, 
   3.803840570044339*^9},
 CellLabel->"In[45]:=",ExpressionUUID->"6495c282-7371-4fbc-bdd0-d0b11f9b4890"],

Cell[BoxData["0.`"], "Output",
 CellChangeTimes->{
  3.803837950453676*^9, 3.803838177014769*^9, 3.803838745445117*^9, 
   3.8038405730287952`*^9, {3.803843135340444*^9, 3.80384315705513*^9}, 
   3.8038433046073713`*^9, 3.806762078193348*^9},
 CellLabel->"Out[45]=",ExpressionUUID->"709d811e-3df5-40bf-b36d-e2c813f80144"]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Initialization Code and Auxiliary Functions", "Section",
 InitializationCell->True,
 CellChangeTimes->{{3.7977837471111794`*^9, 
  3.797783753928751*^9}},ExpressionUUID->"2d09d6c9-4f02-4244-99ce-\
9562dc0d0a1a"],

Cell[CellGroupData[{

Cell["Basic Definitions", "Subsection",
 CellChangeTimes->{{3.798310293830244*^9, 
  3.7983102962451963`*^9}},ExpressionUUID->"c23576a4-89e7-4a6e-aa05-\
9aeea2fcf350"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"directory", "=", 
  RowBox[{"NotebookDirectory", "[", "]"}]}]], "Input",
 InitializationCell->True,
 CellLabel->"In[1]:=",ExpressionUUID->"2932addc-2147-428c-b51d-2a8fee61ac7e"],

Cell[BoxData["\<\"/Users/mbwagner/Documents/MIT/Research/ARG_mathematica_\
models/\"\>"], "Output",
 CellChangeTimes->{
  3.798033154996079*^9, 3.798036514818479*^9, 3.7980365874641314`*^9, 
   3.798037295993359*^9, 3.798037622632765*^9, 3.798197685612657*^9, 
   3.798293756579072*^9, 3.798293896496138*^9, 3.798376558321122*^9, 
   3.798380487389998*^9, 3.798386738652443*^9, 3.798388211688733*^9, 
   3.798389540399067*^9, 3.798390220522912*^9, 3.798398776260734*^9, 
   3.798457887456807*^9, 3.7984591299659233`*^9, 3.798641145067223*^9, 
   3.7988181138545237`*^9, 3.798824975228098*^9, 3.798912820380587*^9, {
   3.8001239122206078`*^9, 3.800123917521448*^9}, {3.800203355269*^9, 
   3.800203356319309*^9}, {3.800204220549724*^9, 3.800204227043495*^9}, 
   3.8007347474018717`*^9, 3.803744833081121*^9, 3.806761775061695*^9, 
   3.807370585558226*^9},
 CellLabel->"Out[1]=",ExpressionUUID->"a47178a7-65a7-4870-ac2b-ea22c9e4c1c6"]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"R", "=", "8.314"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"F", "=", "96485.33212"}], ";"}]}], "Input",
 InitializationCell->True,
 CellLabel->"In[2]:=",ExpressionUUID->"281b4875-6000-44d3-99dc-1f6a304b53e3"],

Cell[BoxData[
 RowBox[{
  RowBox[{"elementSymbols", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"ElementData", "[", 
      RowBox[{"i", ",", "\"\<Abbreviation\>\""}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"i", ",", "1", ",", "118"}], "}"}]}], "]"}]}], ";"}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.79803320694841*^9, 3.7980332336293*^9}},
 CellLabel->"In[4]:=",ExpressionUUID->"ac6800f3-5a6b-497e-a91c-8ae4ebd1701d"]
}, Closed]],

Cell[CellGroupData[{

Cell["GUI", "Subsection",
 InitializationCell->True,
 CellChangeTimes->{{3.798310300878831*^9, 
  3.7983103009605713`*^9}},ExpressionUUID->"90f8848a-5d6e-4181-b2a1-\
53a50fa9040e"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"runGUI", " ", ":=", "\[IndentingNewLine]", 
    RowBox[{"CreateDialog", "[", 
     RowBox[{
      RowBox[{"Grid", "[", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"\"\<More noble metal:\>\"", ",", " ", 
            RowBox[{"PopupMenu", "[", 
             RowBox[{
              RowBox[{"Dynamic", "[", "mA", "]"}], ",", " ", 
              "elementSymbols"}], "]"}]}], "}"}], ",", " ", "\n", "      ", 
          RowBox[{"{", 
           RowBox[{"\"\<     #electrons to reduce one mol:\>\"", ",", " ", 
            RowBox[{"InputField", "[", 
             RowBox[{"Dynamic", "[", "nA", "]"}], "]"}]}], "}"}], ",", " ", 
          "\n", "      ", 
          RowBox[{"{", 
           RowBox[{"\"\<More reactive metal:\>\"", ",", " ", 
            RowBox[{"PopupMenu", "[", 
             RowBox[{
              RowBox[{"Dynamic", "[", "mB", "]"}], ",", " ", 
              "elementSymbols"}], "]"}]}], "}"}], ",", " ", "\n", "      ", 
          RowBox[{"{", 
           RowBox[{"\"\<     #electrons to reduce one mol:\>\"", ",", " ", 
            RowBox[{"InputField", "[", 
             RowBox[{"Dynamic", "[", "nB", "]"}], "]"}]}], "}"}], ",", " ", 
          "\n", "      ", 
          RowBox[{"{", 
           RowBox[{"\"\<Process Temperature (K)\>\"", ",", " ", 
            RowBox[{"InputField", "[", 
             RowBox[{"Dynamic", "[", "T", "]"}], "]"}]}], "}"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{
           "\"\<Additional element in cathode?:\>\"", ",", " ", "\n", 
            "       ", 
            RowBox[{"PopupMenu", "[", 
             RowBox[{
              RowBox[{"Dynamic", "[", "mC", "]"}], ",", " ", 
              RowBox[{"Prepend", "[", 
               RowBox[{"elementSymbols", ",", " ", "Null"}], "]"}]}], "]"}]}],
            "}"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{
           "\"\<Do you want to analyze experimental data as well?\>\"", ",", 
            RowBox[{"PopupMenu", "[", 
             RowBox[{
              RowBox[{"Dynamic", "[", "yesno", "]"}], ",", 
              RowBox[{"{", 
               RowBox[{"\"\<yes\>\"", ",", "\"\<no\>\""}], "}"}]}], "]"}]}], 
           "}"}], ",", "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"CancelButton", "[", "]"}], ",", " ", 
            RowBox[{"DefaultButton", "[", 
             RowBox[{"DialogReturn", "[", "\n", "           ", 
              RowBox[{"CreateDialog", "[", 
               RowBox[{"Grid", "[", 
                RowBox[{"{", 
                 RowBox[{
                  RowBox[{"{", 
                   RowBox[{"\"\<More oxidizing atom:\>\"", ",", " ", 
                    RowBox[{"PopupMenu", "[", 
                    RowBox[{
                    RowBox[{"Dynamic", "[", "mOx", "]"}], ",", " ", 
                    "elementSymbols"}], "]"}]}], "}"}], ",", 
                  RowBox[{"{", 
                   RowBox[{
                    RowBox[{"TextCell", "[", "\"\<valence number\>\"", "]"}], 
                    ",", " ", 
                    RowBox[{"InputField", "[", "\n", "                ", 
                    RowBox[{
                    RowBox[{"Dynamic", "[", "nOx", "]"}], ",", " ", 
                    "Number"}], "]"}]}], "}"}], ",", " ", 
                  RowBox[{"{", 
                   RowBox[{"\"\<     gas produced at anode is: \>\"", ",", 
                    RowBox[{"PopupMenu", "[", 
                    RowBox[{
                    RowBox[{"Dynamic", "[", "diamono", "]"}], ",", 
                    RowBox[{"{", 
                    RowBox[{"\"\<monotomic\>\"", ",", "\"\<diatomic\>\""}], 
                    "}"}]}], "]"}]}], "}"}], ",", " ", 
                  RowBox[{"{", 
                   RowBox[{
                    RowBox[{"CancelButton", "[", "]"}], ",", " ", 
                    RowBox[{"DefaultButton", "[", 
                    RowBox[{"DialogReturn", "[", 
                    RowBox[{"Evaluate", "[", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{"mC", " ", "===", " ", "Null"}], ",", " ", "\n", 
                    "           ", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{"yesno", "===", "\"\<yes\>\""}], ",", " ", 
                    "expDialog", ",", "closeDialog"}], "]"}], ",", 
                    "cathodeDialog"}], "]"}], "\n", "           ", "]"}], 
                    "]"}], "]"}]}], "}"}]}], "}"}], "]"}], "]"}], "]"}], 
             "]"}]}], "}"}]}], "}"}], ",", " ", "\n", "     ", 
        RowBox[{"Spacings", " ", "->", " ", 
         RowBox[{"{", 
          RowBox[{"1", ",", " ", "Automatic"}], "}"}]}], ",", " ", 
        RowBox[{"Alignment", " ", "->", " ", "Left"}]}], "]"}], ",", " ", 
      RowBox[{"Modal", " ", "->", " ", "True"}]}], "]"}]}], ";"}], 
  " "}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.798310325108276*^9, 3.798310328758922*^9}, {
   3.798310977441115*^9, 3.798310991969944*^9}, {3.7983110221651077`*^9, 
   3.798311074670409*^9}, {3.7983111930268993`*^9, 3.79831119849655*^9}, {
   3.798373567377743*^9, 3.7983735755257053`*^9}, {3.7983738059842253`*^9, 
   3.798373807250173*^9}, {3.7983770288876257`*^9, 3.798377059142589*^9}, {
   3.798377095005415*^9, 3.798377163547249*^9}, {3.7988184666764593`*^9, 
   3.79881851020163*^9}, 3.7988185944021606`*^9},
 CellLabel->"In[5]:=",ExpressionUUID->"09a73c68-4558-4956-9a70-ac9c3416046b"],

Cell[BoxData[
 RowBox[{"closeDialog", ":=", 
  RowBox[{"CreateDialog", "[", 
   RowBox[{"Column", "[", 
    RowBox[{"{", 
     RowBox[{"\"\<Initial conditions have been set.\>\"", ",", " ", 
      RowBox[{"DefaultButton", "[", 
       RowBox[{"DialogReturn", "[", 
        RowBox[{"data", "=", 
         RowBox[{"Evaluate", "@", "EdiagramData"}]}], "]"}], "]"}]}], "}"}], 
    "]"}], "]"}], 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{"closing", " ", "pop"}], "-", "up"}], " ", "*)"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.798308937386074*^9, 3.798308953313655*^9}, {
  3.798308988238282*^9, 3.7983090482057333`*^9}, {3.798311228781312*^9, 
  3.798311233405189*^9}, {3.7984581715068197`*^9, 3.798458192863536*^9}, {
  3.798458347553784*^9, 3.798458349033471*^9}, {3.7984585092622747`*^9, 
  3.798458539941661*^9}, {3.798458704217452*^9, 3.798458716258119*^9}, {
  3.798458836736198*^9, 3.7984588433048773`*^9}, {3.798458882019391*^9, 
  3.798458882776606*^9}},
 CellLabel->"In[6]:=",ExpressionUUID->"c7680075-aa93-40cb-b5b2-dd27ceeda0ae"],

Cell[BoxData[
 RowBox[{"expDialog", ":=", 
  RowBox[{"CreateDialog", "[", 
   RowBox[{"Grid", "[", 
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"TextCell", "[", 
         RowBox[{"StringJoin", "[", 
          RowBox[{
          "\"\<measured mol% of \>\"", ",", "mA", ",", 
           "\"\< in cathode\>\""}], "]"}], "]"}], ",", " ", 
        RowBox[{"InputField", "[", "\n", "                ", 
         RowBox[{
          RowBox[{"Dynamic", "[", "xmA", "]"}], ",", " ", "Number"}], "]"}]}],
        "}"}], ",", "\[IndentingNewLine]", " ", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"TextCell", "[", 
         RowBox[{"StringJoin", "[", 
          RowBox[{
          "\"\<measured mol% of \>\"", ",", "mB", ",", 
           "\"\< in cathode\>\""}], "]"}], "]"}], ",", " ", 
        RowBox[{"InputField", "[", "\n", "                ", 
         RowBox[{
          RowBox[{"Dynamic", "[", "xmB", "]"}], ",", " ", "Number"}], "]"}]}],
        "}"}], ",", "\[IndentingNewLine]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"TextCell", "[", 
         RowBox[{"StringJoin", "[", 
          RowBox[{
          "\"\<measured mol% of \>\"", ",", "mA", ",", 
           "\"\< in electrolyte\>\""}], "]"}], "]"}], ",", " ", 
        RowBox[{"InputField", "[", "\n", "                ", 
         RowBox[{
          RowBox[{"Dynamic", "[", "xmAOx", "]"}], ",", " ", "Number"}], 
         "]"}]}], "}"}], ",", " ", "\[IndentingNewLine]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"TextCell", "[", 
         RowBox[{"StringJoin", "[", 
          RowBox[{
          "\"\<measured mol% of \>\"", ",", "mB", ",", 
           "\"\< in electrolyte\>\""}], "]"}], "]"}], ",", " ", 
        RowBox[{"InputField", "[", "\n", "                ", 
         RowBox[{
          RowBox[{"Dynamic", "[", "xmBOx", "]"}], ",", " ", "Number"}], 
         "]"}]}], "}"}], ",", "\[IndentingNewLine]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"TextCell", "[", 
         RowBox[{
         "StringJoin", "[", "\"\<measured mol% of supporting electrolyte\>\"",
           "]"}], "]"}], ",", " ", 
        RowBox[{"InputField", "[", "\n", "                ", 
         RowBox[{
          RowBox[{"Dynamic", "[", "xSE", "]"}], ",", " ", "Number"}], "]"}]}],
        "}"}], ",", "\[IndentingNewLine]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"CancelButton", "[", "]"}], ",", " ", 
        RowBox[{"DefaultButton", "[", 
         RowBox[{"DialogReturn", "[", 
          RowBox[{"Evaluate", "@", "closeDialog"}], "]"}], "]"}]}], "}"}]}], 
     "}"}], "]"}], "]"}], " ", 
  RowBox[{"(*", " ", 
   RowBox[{"pop", "-", 
    RowBox[{"up", " ", "for", " ", "experimental", " ", "input"}]}], 
   "*)"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{
  3.798310347399403*^9, {3.800203235299295*^9, 3.800203292786586*^9}},
 CellLabel->"In[7]:=",ExpressionUUID->"abf11c1b-2248-40c5-934f-913d9e38b578"],

Cell[BoxData[
 RowBox[{"cathodeDialog", ":=", 
  RowBox[{"CreateDialog", "[", 
   RowBox[{"Grid", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"TextCell", "[", "\"\<mol% of cathode element \>\"", "]"}], 
        ",", " ", 
        RowBox[{"InputField", "[", "\n", "                ", 
         RowBox[{
          RowBox[{"Dynamic", "[", "xCathode", "]"}], ",", " ", "Number"}], 
         "]"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{
        "TextCell", "[", " ", "\"\<     fixed along binary with \>\"", "]"}], 
        ",", " ", 
        RowBox[{"PopupMenu", "[", "\n", "                ", 
         RowBox[{
          RowBox[{"Dynamic", "[", "mF", "]"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"mA", ",", " ", "mB"}], "}"}]}], "]"}]}], "}"}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{
        "TextCell", "[", 
         "\"\<select which pseudobinary metal activity data \\nyou would like \
to use\>\"", "]"}], ",", 
        RowBox[{"FileNameSetter", "[", 
         RowBox[{
          RowBox[{"Dynamic", "[", "factsage", "]"}], ",", "\"\<Open\>\""}], 
         "]"}]}], "}"}], ",", " ", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"CancelButton", "[", "]"}], ",", " ", 
        RowBox[{"DefaultButton", "[", 
         RowBox[{"DialogReturn", "[", 
          RowBox[{"Evaluate", "[", 
           RowBox[{"If", "[", 
            RowBox[{
             RowBox[{"yesno", "===", "\"\<yes\>\""}], ",", 
             RowBox[{"Run", "@", "expDialog"}], ",", 
             RowBox[{"Run", "@", "closeDialog"}]}], "]"}], "]"}], "]"}], 
         "]"}]}], "}"}]}], "}"}], "]"}], "]"}], 
  RowBox[{"(*", 
   RowBox[{"pop", "-", 
    RowBox[{
    "up", " ", "for", " ", "cathode", " ", "element", " ", "information"}]}], 
   " ", "*)"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.798310863830577*^9, 3.798310880531383*^9}, {
  3.7983111853633842`*^9, 3.7983111877994843`*^9}, {3.798311319592517*^9, 
  3.7983113377754374`*^9}, {3.798311371355092*^9, 3.7983113746393213`*^9}, {
  3.7983790321562023`*^9, 3.798379033133457*^9}, {3.798379096341528*^9, 
  3.798379156411923*^9}, {3.798379199089769*^9, 3.798379214586266*^9}, {
  3.798379276532219*^9, 3.798379313048317*^9}, {3.798379744430488*^9, 
  3.798379770316922*^9}, {3.798379820788883*^9, 3.798379899757885*^9}},
 CellLabel->"In[8]:=",ExpressionUUID->"1bdd8932-f950-437e-8771-b7db70b5ab56"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Data Importers", "Subsection",
 CellChangeTimes->{{3.798310377135695*^9, 
  3.798310381056374*^9}},ExpressionUUID->"accede30-6ecd-4f70-9bad-\
f5d61a42f2ef"],

Cell[BoxData[
 RowBox[{
  RowBox[{"readtext", "[", "metal_", "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "data", ",", "deletelines", ",", "justData", ",", "formattedData", ",", 
      "transitionRemover", ",", "duplicatesRemoved", ",", "finaldata", ",", 
      "deletelines2", ",", "ModQ", ",", "TversusE"}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"ModQ", "[", 
        RowBox[{"val_", ",", "div_", ",", "rem_"}], "]"}], ":=", 
       RowBox[{"TrueQ", "[", 
        RowBox[{
         RowBox[{"Mod", "[", 
          RowBox[{"val", ",", "div"}], "]"}], "\[NotEqual]", " ", "0."}], 
        "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
        RowBox[{
        "function", " ", "needed", " ", "later", " ", "on", " ", "to", " ", 
         "identify", " ", "phase", " ", "transitions", " ", "at", " ", 
         "non"}], "-", "\[IndentingNewLine]", 
        RowBox[{"integer", " ", "temperatures"}]}], "*)"}], 
      "\[IndentingNewLine]", 
      RowBox[{"data", "=", 
       RowBox[{"Drop", "[", 
        RowBox[{
         RowBox[{"ReadList", "[", 
          RowBox[{
           RowBox[{"StringJoin", "[", 
            RowBox[{
            "directory", ",", "\"\<TD_data_metalnorm/Greaction/\>\"", ",", 
             "metal", ",", "\"\<.txt\>\""}], "]"}], ",", "Word", ",", 
           RowBox[{"RecordLists", "\[Rule]", "True"}]}], "]"}], ",", "2"}], 
        "]"}]}], ";", 
      RowBox[{"(*", 
       RowBox[{
       "imports", " ", "data", " ", "from", " ", "text", " ", "file", " ", 
        "and", " ", "removes", " ", "header"}], "*)"}], "\[IndentingNewLine]", 
      RowBox[{"deletelines", "=", 
       RowBox[{"Position", "[", 
        RowBox[{
         RowBox[{"StringContainsQ", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{"data", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"{", 
              RowBox[{"x", ",", "1", ",", 
               RowBox[{"Length", "[", "data", "]"}]}], "}"}]}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{
            "\"\<__\>\"", ",", "\"\<S\>\"", ",", "\"\<L\>\"", ",", 
             "\"\<G\>\"", ",", "\"\<--\>\"", ",", "metal", ",", "\"\<T\>\""}],
             "}"}]}], "]"}], ",", "True"}], "]"}]}], ";", 
      RowBox[{"(*", 
       RowBox[{
       "identifies", " ", "filler", " ", "lines", " ", "with", " ", "no", " ",
         "information"}], "*)"}], "\[IndentingNewLine]", 
      RowBox[{"justData", "=", 
       RowBox[{"Delete", "[", 
        RowBox[{"data", ",", "deletelines"}], "]"}]}], ";", " ", 
      RowBox[{"(*", 
       RowBox[{"removes", " ", "these", " ", "filler", " ", "lines"}], " ", 
       "*)"}], "\[IndentingNewLine]", 
      RowBox[{"formattedData", "=", 
       RowBox[{"ToExpression", "[", 
        RowBox[{"Take", "[", 
         RowBox[{"justData", ",", "All", ",", "6"}], "]"}], "]"}]}], ";", 
      RowBox[{"(*", 
       RowBox[{
       "removes", " ", "problematic", " ", "Enthalpy", " ", "column", " ", 
        "with", " ", "T", " ", "component", " ", "and", " ", "converts", " ", 
        "all", " ", "strings", " ", "to", " ", "numbers"}], "*)"}], 
      "\[IndentingNewLine]", 
      RowBox[{"duplicatesRemoved", "=", 
       RowBox[{"DeleteDuplicatesBy", "[", 
        RowBox[{"formattedData", ",", "First"}], "]"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
       "Deletes", " ", "duplicates", " ", "in", " ", "temperature", " ", 
        "caused", " ", "by", " ", "phase", " ", "transitions"}], "*)"}], " ", 
      "\[IndentingNewLine]", 
      RowBox[{"finaldata", "=", 
       RowBox[{"Delete", "[", 
        RowBox[{"duplicatesRemoved", ",", 
         RowBox[{"Position", "[", 
          RowBox[{
           RowBox[{"duplicatesRemoved", "[", 
            RowBox[{"[", 
             RowBox[{"All", ",", "1"}], "]"}], "]"}], ",", 
           RowBox[{"_", "?", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"ModQ", "[", 
               RowBox[{"#", ",", "1.", ",", "0"}], "]"}], "&"}], ")"}]}]}], 
          "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{
       "identifies", " ", "and", " ", "deltes", " ", "any", " ", "remaining", 
        " ", "extra", " ", "data", " ", "lines", " ", "due", " ", "to", " ", 
        "phase", " ", "transitions", " ", "at", " ", "non"}], "-", 
       RowBox[{"integer", " ", "tempreatures"}]}], "*)"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"TversusE", "=", 
      RowBox[{"Partition", "[", 
       RowBox[{
        RowBox[{"Riffle", "[", 
         RowBox[{
          RowBox[{"finaldata", "[", 
           RowBox[{"[", 
            RowBox[{"All", ",", "1"}], "]"}], "]"}], ",", 
          RowBox[{
           RowBox[{"-", 
            RowBox[{"finaldata", "[", 
             RowBox[{"[", 
              RowBox[{"All", ",", "3"}], "]"}], "]"}]}], "/", 
           RowBox[{"(", 
            RowBox[{"If", "[", 
             RowBox[{
              RowBox[{"metal", "==", "mA"}], ",", 
              RowBox[{"(", 
               RowBox[{"nA", "*", "F"}], ")"}], ",", 
              RowBox[{"If", "[", 
               RowBox[{
                RowBox[{"metal", "==", "mB"}], ",", 
                RowBox[{"(", 
                 RowBox[{"nB", "*", "F"}], ")"}]}], "]"}], ",", 
              RowBox[{
              "Print", "[", 
               "\"\<Error in converting free energy data to potential. Please \
ensure all metals and number of electrons are well defined.\>\"", "]"}]}], 
             " ", "]"}], ")"}]}]}], "]"}], ",", "2"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"Length", "[", "finaldata", "]"}], "\[Equal]", "2001"}], ",", 
       
       RowBox[{"TversusE", "[", 
        RowBox[{"[", 
         RowBox[{
          RowBox[{"T", "-", "272"}], ",", "2"}], "]"}], "]"}], ",", 
       RowBox[{
       "Print", "[", 
        "\"\<Error in data importing. Unable to identify and remove all phase \
transitions. Please ensure that the text file was generated correctly.\>\"", 
        "]"}]}], "]"}]}]}], "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.797703645004294*^9, 3.797703647310515*^9}, {
   3.797703683176754*^9, 3.797703686953874*^9}, {3.7977037690062237`*^9, 
   3.7977037886181087`*^9}, {3.797703891901402*^9, 3.7977038928331757`*^9}, {
   3.797703951366098*^9, 3.7977040759749327`*^9}, {3.797704113381567*^9, 
   3.797704114991458*^9}, {3.797704175697061*^9, 3.797704255048974*^9}, {
   3.797704389496295*^9, 3.797704410817684*^9}, {3.797704566799219*^9, 
   3.7977046358261223`*^9}, {3.797704703565405*^9, 3.797704706245616*^9}, {
   3.7977047385010233`*^9, 3.7977047603128138`*^9}, {3.797704954718584*^9, 
   3.797704977672439*^9}, {3.797705377450148*^9, 3.79770545770409*^9}, {
   3.797705513067398*^9, 3.797705522548308*^9}, {3.797705634174531*^9, 
   3.797705690492586*^9}, {3.797706110349554*^9, 3.797706132689899*^9}, {
   3.797706269245214*^9, 3.797706269624976*^9}, {3.797706560526334*^9, 
   3.797706561490452*^9}, {3.797709642163981*^9, 3.797709655466732*^9}, {
   3.797709693244401*^9, 3.797709714099801*^9}, {3.797709812186431*^9, 
   3.7977098135951357`*^9}, {3.7977098536445417`*^9, 
   3.7977098841177473`*^9}, {3.797709919174891*^9, 3.797709956930284*^9}, {
   3.797710292884692*^9, 3.797710299452745*^9}, {3.797711174108004*^9, 
   3.7977111865213327`*^9}, {3.797711256627461*^9, 3.7977113347904253`*^9}, {
   3.797711372280716*^9, 3.797711389145228*^9}, {3.797711433987136*^9, 
   3.797711446977923*^9}, {3.797711477941745*^9, 3.797711478092307*^9}, {
   3.79771157308112*^9, 3.797711583923953*^9}, {3.7977117824827538`*^9, 
   3.7977118035709057`*^9}, {3.797711846173465*^9, 3.797711854514215*^9}, {
   3.7977810899423637`*^9, 3.7977811441656933`*^9}, {3.797781223860324*^9, 
   3.797781321691304*^9}, {3.797781353169944*^9, 3.797781397876337*^9}, {
   3.7977815872154284`*^9, 3.7977815919098253`*^9}, {3.7977816479728622`*^9, 
   3.797781648507537*^9}, {3.797782414662653*^9, 3.7977827020429296`*^9}, {
   3.7977827499746647`*^9, 3.797782919288004*^9}, {3.797782994651443*^9, 
   3.797782995059492*^9}, {3.797783051594966*^9, 3.79778310704291*^9}, {
   3.797783139113329*^9, 3.797783143342997*^9}, {3.7977831948876877`*^9, 
   3.7977832471197233`*^9}, {3.797783325993116*^9, 3.797783448085806*^9}, {
   3.797783565468286*^9, 3.79778369470968*^9}, {3.798215328404859*^9, 
   3.798215341951173*^9}, {3.798293420390636*^9, 3.798293421966651*^9}, {
   3.798293572223703*^9, 3.798293574634335*^9}, {3.7982939295943317`*^9, 
   3.798293933793054*^9}, {3.798293978352282*^9, 3.79829399410964*^9}, {
   3.798297958794181*^9, 3.798297966375471*^9}, 3.798380846184094*^9},
 CellLabel->"In[9]:=",ExpressionUUID->"32388c31-3ab2-425a-a5ea-f4d52411494b"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ssdifference", "[", "metal_", "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "data", ",", "header", ",", "standardstate", ",", "liquidG", ",", 
      "deltaGsstoL", ",", "liquidcolumn"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"data", "=", 
      RowBox[{"Import", "[", 
       RowBox[{
        RowBox[{"StringJoin", "[", 
         RowBox[{
         "directory", ",", "\"\<TD_data_metalnorm/G_standardstate/\>\"", ",", 
          "metal", ",", "\"\<_ss.xlsx\>\""}], "]"}], ",", 
        RowBox[{"{", 
         RowBox[{"\"\<Data\>\"", ",", "1", ",", 
          RowBox[{"T", "-", "271"}], ",", "All"}], "}"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
      "imports", " ", "the", " ", "list", " ", "of", " ", "activities", " ", 
       "of", " ", "various", " ", "phases", " ", "at", " ", "a", " ", "given",
        " ", "temperature", " ", "from", " ", "FactSage"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"header", "=", 
      RowBox[{"Import", "[", 
       RowBox[{
        RowBox[{"StringJoin", "[", 
         RowBox[{
         "directory", ",", "\"\<TD_data_metalnorm/G_standardstate/\>\"", ",", 
          "metal", ",", "\"\<_ss.xlsx\>\""}], "]"}], ",", 
        RowBox[{"{", 
         RowBox[{"\"\<Data\>\"", ",", "1", ",", "1", ",", "All"}], "}"}]}], 
       "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
      "imports", " ", "the", " ", "header", " ", "from", " ", "FactSage", " ",
        "to", " ", "identify", " ", "which", " ", "column", " ", "contains", 
       " ", "the", " ", "liquid", " ", "phase"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"liquidcolumn", "=", 
      RowBox[{
       RowBox[{"Position", "[", 
        RowBox[{
         RowBox[{"StringContainsQ", "[", 
          RowBox[{"header", ",", "\"\<liq\>\""}], "]"}], ",", "True"}], "]"}],
        "//", "Flatten"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
      "identifies", " ", "which", " ", "column", " ", "contains", " ", "the", 
       " ", "liquid", " ", "data"}], "*)"}], "\[IndentingNewLine]", 
     RowBox[{"standardstate", "=", 
      RowBox[{"data", "[", 
       RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
      "the", " ", "free", " ", "energy", " ", "of", " ", "the", " ", "metal", 
       " ", "in", " ", "its", " ", "standard", " ", "state", " ", "at", " ", 
       "T"}], "*)"}], "\[IndentingNewLine]", 
     RowBox[{"liquidG", "=", 
      RowBox[{
       RowBox[{"data", "[", 
        RowBox[{"[", "2", "]"}], "]"}], "-", 
       RowBox[{"R", "*", "T", "*", 
        RowBox[{"Log", "[", 
         RowBox[{"data", "[", 
          RowBox[{"[", "liquidcolumn", "]"}], "]"}], "]"}]}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
      "the", " ", "free", " ", "energy", " ", "of", " ", "the", " ", "metal", 
       " ", "in", " ", "its", " ", "liquid", " ", "state", " ", "at", " ", 
       "T", " ", 
       RowBox[{"(", 
        RowBox[{"converted", " ", "from", " ", "activity"}], ")"}]}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"deltaGsstoL", "=", 
      RowBox[{"liquidG", "-", "standardstate"}]}]}]}], "\[IndentingNewLine]", 
   
   RowBox[{"(*", 
    RowBox[{
    "calculates", " ", "the", " ", "change", " ", "in", " ", "free", " ", 
     "energy", " ", "upon", " ", "moving", " ", "the", " ", "metal", " ", 
     "from", " ", "its", " ", "standard", " ", "state", " ", "to", " ", "a", 
     " ", "liquid", " ", "phase"}], "*)"}], "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.797783895520402*^9, 3.7977839770243673`*^9}, {
   3.797784052655884*^9, 3.797784063430471*^9}, {3.797784166368636*^9, 
   3.797784321615522*^9}, {3.797784416212535*^9, 3.797784430200328*^9}, {
   3.797784505812315*^9, 3.797784506127636*^9}, {3.797784682448185*^9, 
   3.797784732005109*^9}, {3.797785329553162*^9, 3.7977853777833233`*^9}, {
   3.797785448205329*^9, 3.797785450751419*^9}, {3.7977857249535103`*^9, 
   3.7977857449430447`*^9}, {3.797785861616467*^9, 3.79778597883183*^9}, {
   3.7977860145184298`*^9, 3.79778603694036*^9}, 3.798033598364736*^9, {
   3.7980364554241743`*^9, 3.798036456796859*^9}, {3.798037913173553*^9, 
   3.798037918638403*^9}, {3.798038108410274*^9, 3.798038110139763*^9}, {
   3.798199709470014*^9, 3.798199711773193*^9}},
 CellLabel->"In[10]:=",ExpressionUUID->"97c89c7c-8fc7-46e4-a26f-e257dc534e88"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Data Analysis", "Subsection",
 CellChangeTimes->{{3.798310385042897*^9, 
  3.798310386809392*^9}},ExpressionUUID->"06f3d861-2006-4c15-b584-\
026ac9796df3"],

Cell[BoxData[
 RowBox[{"EdiagramData", ":=", 
  RowBox[{"Quiet", "@", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "spreadsheet", ",", "aLmA", ",", "aLmB", ",", "x", ",", "xA", ",", "xB",
        ",", "xC", ",", "\[Alpha]", ",", "\[Gamma]A", ",", "\[Gamma]B", ",", 
       "listEDl", ",", "interp", ",", "\[CapitalDelta]GAss", ",", 
       "\[CapitalDelta]GBss"}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"spreadsheet", "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"mC", "===", "Null"}], ",", 
         RowBox[{"Import", "[", 
          RowBox[{
           RowBox[{"StringJoin", "[", 
            RowBox[{
            "directory", ",", 
             "\"\<TD_data_metalNorm/binary_activity_data/\>\"", ",", 
             RowBox[{"ToString", "[", "T", "]"}], ",", "mA", ",", "mB", ",", 
             "\"\<.xlsx\>\""}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{"\"\<Data\>\"", ",", "1", ",", 
             RowBox[{"1", ";;", "1002"}], ",", "All"}], "}"}]}], "]"}], ",", 
         RowBox[{"Import", "[", 
          RowBox[{"factsage", ",", 
           RowBox[{"{", 
            RowBox[{"\"\<Data\>\"", ",", "1", ",", 
             RowBox[{"1", ";;", "1002"}], ",", "All"}], "}"}]}], "]"}]}], 
        "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"aLmA", "=", 
       RowBox[{"Drop", "[", 
        RowBox[{
         RowBox[{"Drop", "[", 
          RowBox[{
           RowBox[{"spreadsheet", "[", 
            RowBox[{"[", 
             RowBox[{"All", ",", 
              RowBox[{
               RowBox[{"Flatten", "[", 
                RowBox[{"Position", "[", 
                 RowBox[{
                  RowBox[{"StringContainsQ", "[", 
                   RowBox[{
                    RowBox[{"spreadsheet", "[", 
                    RowBox[{"[", 
                    RowBox[{"1", ",", "All"}], "]"}], "]"}], ",", "mA"}], 
                   "]"}], ",", "True"}], "]"}], "]"}], "[", 
               RowBox[{"[", "1", "]"}], "]"}]}], "]"}], "]"}], ",", "2"}], 
          "]"}], ",", 
         RowBox[{"-", "1"}]}], "]"}]}], "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
       "locates", " ", "which", " ", "column", " ", "contains", " ", "data", 
        " ", "from", " ", "metal", " ", "A", " ", "and", " ", "imports", " ", 
        "the", " ", "activity", " ", "of", " ", "its", " ", "liquid", " ", 
        "phase"}], "*)"}], ";", "\[IndentingNewLine]", 
      RowBox[{"aLmB", "=", 
       RowBox[{"Drop", "[", 
        RowBox[{
         RowBox[{"Drop", "[", 
          RowBox[{
           RowBox[{"spreadsheet", "[", 
            RowBox[{"[", 
             RowBox[{"All", ",", 
              RowBox[{
               RowBox[{"Flatten", "[", 
                RowBox[{"Position", "[", 
                 RowBox[{
                  RowBox[{"StringContainsQ", "[", 
                   RowBox[{
                    RowBox[{"spreadsheet", "[", 
                    RowBox[{"[", 
                    RowBox[{"1", ",", "All"}], "]"}], "]"}], ",", "mB"}], 
                   "]"}], ",", "True"}], "]"}], "]"}], "[", 
               RowBox[{"[", "1", "]"}], "]"}]}], "]"}], "]"}], ",", "2"}], 
          "]"}], ",", 
         RowBox[{"-", "1"}]}], "]"}]}], "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
       "locates", " ", "which", " ", "column", " ", "contains", " ", "data", 
        " ", "from", " ", "metal", " ", "B", " ", "and", " ", "imports", " ", 
        "the", " ", "activity", " ", "of", " ", "its", " ", "liquid", " ", 
        "phase"}], "*)"}], ";", "\[IndentingNewLine]", 
      RowBox[{"x", "=", 
       RowBox[{"Drop", "[", 
        RowBox[{
         RowBox[{"Drop", "[", 
          RowBox[{
           RowBox[{"spreadsheet", "[", 
            RowBox[{"[", 
             RowBox[{"All", ",", "1"}], "]"}], "]"}], ",", "2"}], "]"}], ",", 
         
         RowBox[{"-", "1"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"\[Alpha]", "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"Position", "[", 
            RowBox[{
             RowBox[{"StringContainsQ", "[", 
              RowBox[{
               RowBox[{"spreadsheet", "[", 
                RowBox[{"[", 
                 RowBox[{"1", ",", "All"}], "]"}], "]"}], ",", "mA"}], "]"}], 
             ",", "True"}], "]"}], "[", 
           RowBox[{"[", "1", "]"}], "]"}], "==", 
          RowBox[{
           RowBox[{"Position", "[", 
            RowBox[{
             RowBox[{"spreadsheet", "[", 
              RowBox[{"[", 
               RowBox[{"2", ",", "All"}], "]"}], "]"}], ",", "0."}], "]"}], 
           "[", 
           RowBox[{"[", "2", "]"}], "]"}]}], ",", "0", ",", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{
            RowBox[{
             RowBox[{"Position", "[", 
              RowBox[{
               RowBox[{"StringContainsQ", "[", 
                RowBox[{
                 RowBox[{"spreadsheet", "[", 
                  RowBox[{"[", 
                   RowBox[{"1", ",", "All"}], "]"}], "]"}], ",", "mB"}], 
                "]"}], ",", "True"}], "]"}], "[", 
             RowBox[{"[", "1", "]"}], "]"}], "==", 
            RowBox[{
             RowBox[{"Position", "[", 
              RowBox[{
               RowBox[{"spreadsheet", "[", 
                RowBox[{"[", 
                 RowBox[{"2", ",", "All"}], "]"}], "]"}], ",", "0."}], "]"}], 
             "[", 
             RowBox[{"[", "2", "]"}], "]"}]}], ",", "1", ",", 
           RowBox[{
           "Print", "[", 
            "\"\<error in reading data from FactSage spreadsheet. Please \
ensure spreadsheet is generated correctly\>\"", "]"}]}], "]"}]}], "]"}]}], 
      ";", "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
       "imports", " ", "the", " ", "\"\<Alpha\>\"", " ", "from", " ", 
        "FactSage"}], "*)"}], "\[IndentingNewLine]", 
      RowBox[{"xA", "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"mC", "===", "Null"}], ",", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"\[Alpha]", "\[Equal]", "0"}], ",", "x", ",", 
           RowBox[{"(", 
            RowBox[{"1", "-", "x"}], ")"}]}], "]"}], ",", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"mA", "===", "mF"}], ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{"1", "-", "x"}], ")"}], 
            RowBox[{"(", 
             RowBox[{"1", "-", 
              RowBox[{"xCathode", "/", "100"}]}], ")"}]}], ",", 
           RowBox[{"If", "[", 
            RowBox[{
             RowBox[{"mB", "===", "mF"}], ",", "x", ",", 
             RowBox[{
             "Print", "[", 
              "\"\<error, pseudobinary in cathode incorrectly defined. Please \
check initial conditions\>\"", "]"}]}], "]"}]}], "]"}]}], "]"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"xB", "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"mC", "===", "Null"}], ",", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"\[Alpha]", "\[Equal]", "1"}], ",", "x", ",", 
           RowBox[{"(", 
            RowBox[{"1", "-", "x"}], ")"}]}], "]"}], ",", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"mB", "===", "mF"}], ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{"1", "-", "x"}], ")"}], 
            RowBox[{"(", 
             RowBox[{"1", "-", 
              RowBox[{"xCathode", "/", "100"}]}], ")"}]}], ",", 
           RowBox[{"If", "[", 
            RowBox[{
             RowBox[{"mA", "===", "mF"}], ",", "x", ",", 
             RowBox[{
             "Print", "[", 
              "\"\<error, pseudobinary in cathode incorrectly defined. Please \
check initial conditions\>\"", "]"}]}], "]"}]}], "]"}]}], "]"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"xC", "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"mC", "===", "Null"}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "x"}], ")"}], "*", 
          RowBox[{"xCathode", "/", "100"}]}]}], "]"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
       "defines", " ", "the", " ", "ternary", " ", "composition", " ", "as", 
        " ", "a", " ", "function", " ", "of", " ", "the", " ", "independent", 
        " ", "metal", " ", 
        RowBox[{"(", 
         RowBox[{
         "the", " ", "metal", " ", "not", " ", "used", " ", "in", " ", "the", 
          " ", "cathode", " ", "psdeudobinary"}]}]}], "*)"}], 
      "\[IndentingNewLine]", 
      RowBox[{"\[Gamma]A", "=", 
       RowBox[{"aLmA", "/", "xA"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"\[Gamma]B", "=", 
       RowBox[{"aLmB", "/", "xB"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{"defines", " ", "the", " ", "activity", " ", "coefficient"}], 
       "*)"}], "\[IndentingNewLine]", 
      RowBox[{"\[CapitalDelta]GAss", "=", 
       RowBox[{"(*", 
        RowBox[{
         RowBox[{"ssdifference", "[", "mA", "]"}], "[", 
         RowBox[{"[", "1", "]"}], "]"}], "*)"}], "0"}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"\[CapitalDelta]GBss", "=", 
       RowBox[{"(*", 
        RowBox[{
         RowBox[{"ssdifference", "[", "mB", "]"}], "[", 
         RowBox[{"[", "1", "]"}], "]"}], "*)"}], "0"}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"listEDl", "=", 
       RowBox[{"Thread", "[", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{
           RowBox[{"(", "x", ")"}], "*", "100"}], ",", 
          RowBox[{
           FractionBox[
            RowBox[{
             RowBox[{
              RowBox[{"-", "nB"}], " ", "\[CapitalDelta]GAss"}], "+", 
             RowBox[{"nA", " ", "\[CapitalDelta]GBss"}], "-", 
             RowBox[{"nB", " ", "R", " ", "T", " ", 
              RowBox[{"Log", "[", 
               RowBox[{
                RowBox[{"-", 
                 RowBox[{"(", 
                  RowBox[{
                   RowBox[{"-", "1"}], "+", "xB", "+", "xC"}], ")"}]}], " ", 
                "\[Gamma]A"}], "]"}]}], "+", 
             RowBox[{"nA", " ", "R", " ", "T", " ", 
              RowBox[{"Log", "[", 
               RowBox[{"xB", " ", "\[Gamma]B"}], "]"}]}]}], 
            RowBox[{"(", 
             RowBox[{"F", " ", "nA", " ", "nB"}], ")"}]], "*", 
           RowBox[{"-", "1"}]}]}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"interp", "=", 
       RowBox[{"Interpolation", "[", "listEDl", "]"}]}]}]}], 
    "]"}]}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.7982871003465137`*^9, 3.798287132945314*^9}, {
   3.79837239798009*^9, 3.798372398716654*^9}, {3.798372438690192*^9, 
   3.798372455623036*^9}, {3.7983755131229277`*^9, 3.798375514364586*^9}, {
   3.798379939085655*^9, 3.798379940468465*^9}, 3.7983807365408*^9, {
   3.7983811244779463`*^9, 3.798381130899416*^9}, {3.798381241532761*^9, 
   3.798381273017314*^9}, {3.7983813481436872`*^9, 3.7983813939589663`*^9}, {
   3.7983814639869413`*^9, 3.798381464131246*^9}, {3.798381515052944*^9, 
   3.798381536832481*^9}, {3.7983824198820677`*^9, 3.798382420428721*^9}, 
   3.7983863459062843`*^9, {3.798386862058529*^9, 3.798386885504442*^9}, {
   3.798388361729721*^9, 3.7983884147117977`*^9}, {3.798388482488098*^9, 
   3.798388482930932*^9}, {3.7983886538584013`*^9, 3.798388674624729*^9}, {
   3.798388831371014*^9, 3.798388841318837*^9}, {3.798388959304523*^9, 
   3.798388988633132*^9}, {3.798389393588109*^9, 3.7983893952252073`*^9}, {
   3.79838963689275*^9, 3.798389638484187*^9}, {3.798390930924897*^9, 
   3.798390932250186*^9}, 3.798457843934512*^9, 3.798458097165433*^9, 
   3.79845838773991*^9, {3.7986413582791653`*^9, 3.798641366766049*^9}},
 CellLabel->"In[11]:=",ExpressionUUID->"914f57e0-38f7-4022-99d4-37cbd98e7bc6"],

Cell[BoxData[
 RowBox[{
  RowBox[{"EdiagramPlotter", "[", "xmax_", "]"}], ":=", "\[IndentingNewLine]", 
  RowBox[{"Plot", "[", 
   RowBox[{
    RowBox[{"data", "[", "x", "]"}], ",", 
    RowBox[{"{", 
     RowBox[{"x", ",", "0", ",", "xmax"}], "}"}], ",", 
    RowBox[{"PlotStyle", "\[Rule]", 
     RowBox[{"Directive", "[", 
      RowBox[{"Black", ",", 
       RowBox[{"Thickness", "[", "0.015", "]"}]}], "]"}]}], ",", 
    RowBox[{"Frame", "\[Rule]", "True"}], ",", 
    RowBox[{"FrameLabel", "\[Rule]", " ", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"StringJoin", "[", 
        RowBox[{"{", 
         RowBox[{"\"\<mol% \>\"", ",", 
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{"mA", "===", "mF"}], ",", "mB", ",", 
            RowBox[{"If", "[", 
             RowBox[{
              RowBox[{"mB", "===", "mF"}], ",", "mA", ",", "mB"}], "]"}]}], 
           "]"}], ",", "\"\< in cathode\>\"", ",", 
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{"mC", "===", "Null"}], ",", "\"\<\>\"", ",", 
            RowBox[{"StringJoin", "[", 
             RowBox[{
             "\"\<,  \\!\\(\>\"", ",", "mC", ",", "\"\<\\/(\>\"", ",", "mC", 
              ",", "\"\<+\>\"", ",", "mF", ",", "\"\<)\\)\>\"", ",", 
              "\"\<=\>\"", ",", 
              RowBox[{"ToString", "[", 
               RowBox[{"Round", "[", 
                RowBox[{
                 RowBox[{"xCathode", "/", "100"}], ",", "0.01"}], "]"}], 
               "]"}]}], "]"}]}], "]"}]}], "}"}], "]"}], ",", 
       RowBox[{"StringJoin", "[", 
        RowBox[{
         RowBox[{"ToString", "[", 
          RowBox[{
           RowBox[{"Subscript", "[", 
            RowBox[{"\"\<\[CapitalDelta]E\>\"", ",", "mA"}], "]"}], ",", 
           "StandardForm"}], "]"}], ",", "\"\< -\>\"", ",", 
         RowBox[{"ToString", "[", 
          RowBox[{
           RowBox[{"Subscript", "[", 
            RowBox[{"\"\<\[CapitalDelta]E\>\"", ",", "mB"}], "]"}], ",", 
           "StandardForm"}], "]"}], ",", "\"\<  (V)\>\""}], "]"}]}], "}"}]}], 
    ",", 
    RowBox[{"LabelStyle", "\[Rule]", 
     RowBox[{"Directive", "[", 
      RowBox[{"Bold", ",", "Black", ",", "Large"}], "]"}]}], ",", 
    RowBox[{"ImageSize", "\[Rule]", "700"}], ",", 
    RowBox[{"GridLines", "\[Rule]", "Automatic"}]}], "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.790620474299243*^9, 3.7906205107413883`*^9}, {
   3.7906206878797693`*^9, 3.790620718817176*^9}, {3.790620767862656*^9, 
   3.790620770315949*^9}, {3.790620815373822*^9, 3.790620822574704*^9}, {
   3.790620902223796*^9, 3.7906209050333347`*^9}, {3.790620952980529*^9, 
   3.7906209730606623`*^9}, {3.79062103094584*^9, 3.79062114353183*^9}, {
   3.790621341885582*^9, 3.790621361205306*^9}, {3.79062142749581*^9, 
   3.790621430649418*^9}, {3.7906222262531233`*^9, 3.790622226389718*^9}, {
   3.790625645907642*^9, 3.790625646704568*^9}, {3.790625875895577*^9, 
   3.790625881480873*^9}, {3.790628687250792*^9, 3.790628720132971*^9}, {
   3.790628793989334*^9, 3.790628831310833*^9}, {3.7906289384526777`*^9, 
   3.79062894758772*^9}, {3.790629133830838*^9, 3.7906291441387663`*^9}, {
   3.790629192490897*^9, 3.790629197160941*^9}, {3.7906294035083714`*^9, 
   3.7906294337869663`*^9}, {3.790629465322442*^9, 3.790629473006502*^9}, {
   3.790629508073372*^9, 3.79062952825378*^9}, {3.7906310445168867`*^9, 
   3.790631067096712*^9}, {3.790631293504437*^9, 3.790631296767634*^9}, {
   3.790696273882522*^9, 3.790696281565401*^9}, {3.790696312783396*^9, 
   3.790696374334504*^9}, {3.790696585567691*^9, 3.790696586404784*^9}, {
   3.790697487312847*^9, 3.790697540308333*^9}, {3.79069768035441*^9, 
   3.790697739933785*^9}, {3.790697929086121*^9, 3.790697930086379*^9}, {
   3.790697967084723*^9, 3.7906979697653008`*^9}, {3.790698152502089*^9, 
   3.7906981662056837`*^9}, {3.790698216079871*^9, 3.7906982238891697`*^9}, {
   3.790699663848342*^9, 3.7906997011308193`*^9}, {3.7928684883503923`*^9, 
   3.7928684887516336`*^9}, {3.7928699694429493`*^9, 3.792869992330523*^9}, {
   3.7928700242647753`*^9, 3.792870025891518*^9}, {3.794763447740991*^9, 
   3.7947634539550877`*^9}, {3.795870265108611*^9, 3.795870377511342*^9}, {
   3.7958709595539427`*^9, 3.795871017907866*^9}, {3.795871896927395*^9, 
   3.795871904984659*^9}, {3.795872011242772*^9, 3.795872020403987*^9}, {
   3.79778803413947*^9, 3.7977881430250187`*^9}, {3.7977885361274633`*^9, 
   3.7977885446295443`*^9}, {3.797788641003112*^9, 3.797788673868656*^9}, {
   3.797790069705702*^9, 3.797790072456893*^9}, {3.797790254257587*^9, 
   3.797790273616757*^9}, {3.797790777022352*^9, 3.797790787264084*^9}, {
   3.797790942789403*^9, 3.79779096843758*^9}, {3.797791005475012*^9, 
   3.79779107865341*^9}, {3.797791173958006*^9, 3.797791308986642*^9}, {
   3.797791375627227*^9, 3.7977914551413918`*^9}, {3.797791567377646*^9, 
   3.797791591861189*^9}, {3.7978731383152857`*^9, 3.797873141206189*^9}, {
   3.797873201764011*^9, 3.7978732359090557`*^9}, {3.797954299374192*^9, 
   3.797954338473446*^9}, {3.79795439493626*^9, 3.7979544911563396`*^9}, {
   3.79795456961698*^9, 3.797954619882009*^9}, 3.797954657962882*^9, {
   3.797954921079303*^9, 3.797955129259302*^9}, 3.7979551618197927`*^9, {
   3.797955219544553*^9, 3.797955260126645*^9}, {3.797955315609676*^9, 
   3.7979553456527233`*^9}, {3.797955377730648*^9, 3.797955393018675*^9}, {
   3.797955430973686*^9, 3.797955431586011*^9}, {3.797955487007346*^9, 
   3.797955654527829*^9}, 3.797955711713141*^9, {3.7979557664900007`*^9, 
   3.797955812801531*^9}, {3.797959894540781*^9, 3.797959920754421*^9}, {
   3.797960467739088*^9, 3.797960474684504*^9}, {3.7979605807779016`*^9, 
   3.7979607109841127`*^9}, {3.797960853724164*^9, 3.797961072252966*^9}, {
   3.7979611096598673`*^9, 3.797961409340308*^9}, {3.798033362122616*^9, 
   3.7980334531934*^9}, {3.798033580827565*^9, 3.798033593696496*^9}, {
   3.798033646175838*^9, 3.798033706681163*^9}, {3.798033748102229*^9, 
   3.798033969832798*^9}, 3.798034084778946*^9, {3.798035482066085*^9, 
   3.798035482173848*^9}, {3.798035563603163*^9, 3.798035576584087*^9}, {
   3.798036432543841*^9, 3.798036447868127*^9}, {3.7980365776467657`*^9, 
   3.7980365779855013`*^9}, {3.7980368325888147`*^9, 3.798036844082562*^9}, {
   3.798036935361628*^9, 3.7980369406984386`*^9}, {3.79803709065823*^9, 
   3.798037094818115*^9}, {3.7980371279701633`*^9, 3.798037135451708*^9}, {
   3.798037284314077*^9, 3.7980372904583673`*^9}, {3.798037605959673*^9, 
   3.798037609403494*^9}, 3.798197682430941*^9, {3.798197784757482*^9, 
   3.798197788411091*^9}, {3.79819784776612*^9, 3.79819785990821*^9}, {
   3.798198506536005*^9, 3.798198507437817*^9}, 3.798199702198937*^9, {
   3.798202087963572*^9, 3.798202173240767*^9}, {3.798202209665213*^9, 
   3.798202348634652*^9}, {3.798203296818458*^9, 3.798203353366563*^9}, {
   3.798203404302808*^9, 3.798203432699164*^9}, {3.798203530295865*^9, 
   3.798203551185905*^9}, {3.798203671079392*^9, 3.798203702892497*^9}, {
   3.798203758362561*^9, 3.798203763018443*^9}, {3.798203866237639*^9, 
   3.798203867810542*^9}, {3.798204114361752*^9, 3.798204153048414*^9}, {
   3.7982041868054657`*^9, 3.798204255450961*^9}, {3.798209715332099*^9, 
   3.798209769824154*^9}, {3.798209820439756*^9, 3.798209838801743*^9}, {
   3.798209984556196*^9, 3.798210001935996*^9}, {3.798210156206408*^9, 
   3.798210159389902*^9}, {3.798210206788641*^9, 3.798210233356786*^9}, {
   3.798287160249629*^9, 3.798287205471951*^9}, {3.798287283324877*^9, 
   3.798287283760882*^9}, 3.7982875552661963`*^9, {3.798376766760234*^9, 
   3.798376767730864*^9}, {3.798389712136688*^9, 3.7983897215759583`*^9}, 
   3.79838975756847*^9, {3.798390713386724*^9, 3.798390736136138*^9}, {
   3.7983907966556597`*^9, 3.798390824600401*^9}, 3.798399474947687*^9, {
   3.798458745924041*^9, 3.798458746827367*^9}, {3.7984691199645777`*^9, 
   3.798469374948038*^9}, {3.7984694138448257`*^9, 3.7984694216010437`*^9}, 
   3.798469467764172*^9, {3.798469531045924*^9, 3.798469649144416*^9}, {
   3.79847000074582*^9, 3.798470005749178*^9}, {3.798470043306871*^9, 
   3.798470071763445*^9}, {3.798470392762882*^9, 3.798470394667953*^9}, 
   3.798470643640223*^9, {3.798472151394156*^9, 3.798472162123351*^9}, {
   3.798472222869199*^9, 3.798472225675044*^9}, {3.7984722801153717`*^9, 
   3.798472287288601*^9}, {3.7984725474610243`*^9, 3.798472670910221*^9}, {
   3.798658397353158*^9, 3.798658400973812*^9}},
 CellLabel->"In[12]:=",ExpressionUUID->"64c0296d-a357-4cca-87ef-ceea1e7ff752"],

Cell[BoxData[
 RowBox[{"rescaler", ":=", " ", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"xmAr", ",", "xmBr", ",", "xmAOxr", ",", "xmBOxr", ",", "xmC"}], 
     "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"xmC", "=", 
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"mC", "===", "Null"}], ",", "0", ",", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"-", "xCathode"}], "*", "xmA"}], "-", 
           RowBox[{"xCathode", "*", "xmB"}]}], ")"}], "/", 
         RowBox[{"(", 
          RowBox[{"xCathode", "-", "100"}], ")"}]}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"xmAr", "=", 
      RowBox[{"xmA", "/", 
       RowBox[{"(", 
        RowBox[{"xmA", "+", "xmB", "+", "xmC"}], ")"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"xmBr", "=", 
      RowBox[{"xmB", "/", 
       RowBox[{"(", 
        RowBox[{"xmA", "+", "xmB", "+", "xmC"}], ")"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"xmAOxr", "=", 
      RowBox[{
       RowBox[{"xmAOx", "/", 
        RowBox[{"(", 
         RowBox[{"xmAOx", "+", "xmBOx"}], ")"}]}], "*", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"100", "-", "xSE"}], ")"}], "/", "100"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"xmBOxr", "=", 
      RowBox[{
       RowBox[{"xmBOx", "/", 
        RowBox[{"(", 
         RowBox[{"xmAOx", "+", "xmBOx"}], ")"}]}], "*", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"100", "-", "xSE"}], ")"}], "/", "100"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"xmAr", ",", "xmBr", ",", "xmAOxr", ",", "xmBOxr"}], "}"}]}]}], 
   "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.7986439574868603`*^9, 3.798643967551334*^9}, {
  3.800203321927142*^9, 3.800203330258353*^9}, {3.800204260977109*^9, 
  3.800204262676942*^9}, {3.800204297294128*^9, 3.800204299424818*^9}},
 CellLabel->"In[13]:=",ExpressionUUID->"4331df09-ac34-442e-86f4-06d5231d8cef"],

Cell[BoxData[
 RowBox[{
  RowBox[{"EdiagramCompare", ":=", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", "exp", "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"exp", "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"mC", "===", "Null"}], ",", 
         RowBox[{
          RowBox[{"rescaler", "[", 
           RowBox[{"[", "2", "]"}], "]"}], "*", "100"}], ",", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"mF", "===", "mA"}], ",", 
           RowBox[{
            RowBox[{"rescaler", "[", 
             RowBox[{"[", "2", "]"}], "]"}], "*", "100"}], ",", 
           RowBox[{
            RowBox[{"rescaler", "[", 
             RowBox[{"[", "1", "]"}], "]"}], "*", "100"}]}], "]"}]}], "]"}]}],
       ";", "\[IndentingNewLine]", 
      RowBox[{"Plot", "[", 
       RowBox[{
        RowBox[{"data", "[", "x", "]"}], ",", 
        RowBox[{"{", 
         RowBox[{"x", ",", "0", ",", 
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{"exp", "<", "50"}], ",", 
            RowBox[{"exp", "*", "2"}], ",", "100"}], "]"}]}], "}"}], ",", 
        RowBox[{"PlotStyle", "\[Rule]", 
         RowBox[{"Directive", "[", 
          RowBox[{"Black", ",", 
           RowBox[{"Thickness", "[", "0.015", "]"}]}], "]"}]}], ",", 
        RowBox[{"Frame", "\[Rule]", "True"}], ",", 
        RowBox[{"FrameLabel", "\[Rule]", " ", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"StringJoin", "[", 
            RowBox[{"{", 
             RowBox[{"\"\<mol% \>\"", ",", 
              RowBox[{"If", "[", 
               RowBox[{
                RowBox[{"mA", "===", "mF"}], ",", "mB", ",", 
                RowBox[{"If", "[", 
                 RowBox[{
                  RowBox[{"mB", "===", "mF"}], ",", "mA", ",", "mB"}], 
                 "]"}]}], "]"}], ",", "\"\< in cathode  \>\"", ",", 
              RowBox[{"If", "[", 
               RowBox[{
                RowBox[{"mC", "===", "Null"}], ",", "\"\< \>\"", ",", 
                RowBox[{"StringJoin", "[", 
                 RowBox[{
                 "\"\<\\!\\(\>\"", ",", "mC", ",", "\"\<\\/(\>\"", ",", "mC", 
                  ",", "\"\<+\>\"", ",", "mF", ",", "\"\<)\\)\>\"", ",", 
                  "\"\<=\>\"", ",", 
                  RowBox[{"ToString", "[", 
                   RowBox[{"Round", "[", 
                    RowBox[{
                    RowBox[{"xCathode", "/", "100"}], ",", "0.01"}], "]"}], 
                   "]"}]}], "]"}]}], "]"}]}], "}"}], "]"}], ",", 
           RowBox[{"StringJoin", "[", 
            RowBox[{
             RowBox[{"ToString", "[", 
              RowBox[{
               RowBox[{"Subscript", "[", 
                RowBox[{"\"\<\[CapitalDelta]E\>\"", ",", "mA"}], "]"}], ",", 
               "StandardForm"}], "]"}], ",", "\"\< -\>\"", ",", 
             RowBox[{"ToString", "[", 
              RowBox[{
               RowBox[{"Subscript", "[", 
                RowBox[{"\"\<\[CapitalDelta]E\>\"", ",", "mB"}], "]"}], ",", 
               "StandardForm"}], "]"}], ",", "\"\<  (V)\>\""}], "]"}]}], 
          "}"}]}], ",", 
        RowBox[{"LabelStyle", "\[Rule]", 
         RowBox[{"Directive", "[", 
          RowBox[{"Bold", ",", "Black", ",", "Large"}], "]"}]}], ",", 
        RowBox[{"ImageSize", "\[Rule]", "700"}], ",", 
        RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", 
        RowBox[{"Epilog", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"PointSize", "[", "0.06", "]"}], ",", "Red", ",", 
           RowBox[{"Point", "[", 
            RowBox[{"{", 
             RowBox[{"exp", ",", 
              RowBox[{"data", "[", "exp", "]"}]}], "}"}], "]"}]}], "}"}]}]}], 
       "]"}]}]}], "]"}]}], ";"}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.790620474299243*^9, 3.7906205107413883`*^9}, {
   3.7906206878797693`*^9, 3.790620718817176*^9}, {3.790620767862656*^9, 
   3.790620770315949*^9}, {3.790620815373822*^9, 3.790620822574704*^9}, {
   3.790620902223796*^9, 3.7906209050333347`*^9}, {3.790620952980529*^9, 
   3.7906209730606623`*^9}, {3.79062103094584*^9, 3.79062114353183*^9}, {
   3.790621341885582*^9, 3.790621361205306*^9}, {3.79062142749581*^9, 
   3.790621430649418*^9}, {3.7906222262531233`*^9, 3.790622226389718*^9}, {
   3.790625645907642*^9, 3.790625646704568*^9}, {3.790625875895577*^9, 
   3.790625881480873*^9}, {3.790628687250792*^9, 3.790628720132971*^9}, {
   3.790628793989334*^9, 3.790628831310833*^9}, {3.7906289384526777`*^9, 
   3.79062894758772*^9}, {3.790629133830838*^9, 3.7906291441387663`*^9}, {
   3.790629192490897*^9, 3.790629197160941*^9}, {3.7906294035083714`*^9, 
   3.7906294337869663`*^9}, {3.790629465322442*^9, 3.790629473006502*^9}, {
   3.790629508073372*^9, 3.79062952825378*^9}, {3.7906310445168867`*^9, 
   3.790631067096712*^9}, {3.790631293504437*^9, 3.790631296767634*^9}, {
   3.790696273882522*^9, 3.790696281565401*^9}, {3.790696312783396*^9, 
   3.790696374334504*^9}, {3.790696585567691*^9, 3.790696586404784*^9}, {
   3.790697487312847*^9, 3.790697540308333*^9}, {3.79069768035441*^9, 
   3.790697739933785*^9}, {3.790697929086121*^9, 3.790697930086379*^9}, {
   3.790697967084723*^9, 3.7906979697653008`*^9}, {3.790698152502089*^9, 
   3.7906981662056837`*^9}, {3.790698216079871*^9, 3.7906982238891697`*^9}, {
   3.790699663848342*^9, 3.7906997011308193`*^9}, {3.7928684883503923`*^9, 
   3.7928684887516336`*^9}, {3.7928699694429493`*^9, 3.792869992330523*^9}, {
   3.7928700242647753`*^9, 3.792870025891518*^9}, {3.794763447740991*^9, 
   3.7947634539550877`*^9}, {3.795870265108611*^9, 3.795870377511342*^9}, {
   3.7958709595539427`*^9, 3.795871017907866*^9}, {3.795871896927395*^9, 
   3.795871904984659*^9}, {3.795872011242772*^9, 3.795872020403987*^9}, {
   3.79778803413947*^9, 3.7977881430250187`*^9}, {3.7977885361274633`*^9, 
   3.7977885446295443`*^9}, {3.797788641003112*^9, 3.797788673868656*^9}, {
   3.797790069705702*^9, 3.797790072456893*^9}, {3.797790254257587*^9, 
   3.797790273616757*^9}, {3.797790777022352*^9, 3.797790787264084*^9}, {
   3.797790942789403*^9, 3.79779096843758*^9}, {3.797791005475012*^9, 
   3.79779107865341*^9}, {3.797791173958006*^9, 3.797791308986642*^9}, {
   3.797791375627227*^9, 3.7977914551413918`*^9}, {3.797791567377646*^9, 
   3.797791591861189*^9}, {3.7978731383152857`*^9, 3.797873141206189*^9}, {
   3.797873201764011*^9, 3.7978732359090557`*^9}, {3.797954299374192*^9, 
   3.797954338473446*^9}, {3.79795439493626*^9, 3.7979544911563396`*^9}, {
   3.79795456961698*^9, 3.797954619882009*^9}, 3.797954657962882*^9, {
   3.797954921079303*^9, 3.797955129259302*^9}, 3.7979551618197927`*^9, {
   3.797955219544553*^9, 3.797955260126645*^9}, {3.797955315609676*^9, 
   3.7979553456527233`*^9}, {3.797955377730648*^9, 3.797955393018675*^9}, {
   3.797955430973686*^9, 3.797955431586011*^9}, {3.797955487007346*^9, 
   3.797955654527829*^9}, 3.797955711713141*^9, {3.7979557664900007`*^9, 
   3.797955812801531*^9}, {3.797959894540781*^9, 3.797959920754421*^9}, {
   3.797960467739088*^9, 3.797960474684504*^9}, {3.7979605807779016`*^9, 
   3.7979607109841127`*^9}, {3.797960853724164*^9, 3.797961072252966*^9}, {
   3.7979611096598673`*^9, 3.797961409340308*^9}, {3.798033362122616*^9, 
   3.7980334531934*^9}, {3.798033580827565*^9, 3.798033593696496*^9}, {
   3.798033646175838*^9, 3.798033706681163*^9}, {3.798033748102229*^9, 
   3.798033969832798*^9}, 3.798034084778946*^9, {3.798035482066085*^9, 
   3.798035482173848*^9}, {3.798035563603163*^9, 3.798035576584087*^9}, {
   3.798036432543841*^9, 3.798036447868127*^9}, {3.7980365776467657`*^9, 
   3.7980365779855013`*^9}, {3.7980368325888147`*^9, 3.798036844082562*^9}, {
   3.798036935361628*^9, 3.7980369406984386`*^9}, {3.79803709065823*^9, 
   3.798037094818115*^9}, {3.7980371279701633`*^9, 3.798037135451708*^9}, {
   3.798037284314077*^9, 3.7980372904583673`*^9}, {3.798037605959673*^9, 
   3.798037609403494*^9}, 3.798197682430941*^9, {3.798197784757482*^9, 
   3.798197788411091*^9}, {3.79819784776612*^9, 3.79819785990821*^9}, {
   3.798198506536005*^9, 3.798198507437817*^9}, 3.798199702198937*^9, {
   3.798202087963572*^9, 3.798202173240767*^9}, {3.798202209665213*^9, 
   3.798202348634652*^9}, {3.798203296818458*^9, 3.798203353366563*^9}, {
   3.798203404302808*^9, 3.798203432699164*^9}, {3.798203530295865*^9, 
   3.798203551185905*^9}, {3.798203671079392*^9, 3.798203702892497*^9}, {
   3.798203758362561*^9, 3.798203763018443*^9}, {3.798203866237639*^9, 
   3.798203867810542*^9}, {3.798204114361752*^9, 3.798204153048414*^9}, {
   3.7982041868054657`*^9, 3.798204255450961*^9}, {3.798209715332099*^9, 
   3.798209769824154*^9}, {3.798209820439756*^9, 3.798209838801743*^9}, {
   3.798209984556196*^9, 3.798210001935996*^9}, {3.798210156206408*^9, 
   3.798210159389902*^9}, {3.798210206788641*^9, 3.798210233356786*^9}, {
   3.798211961276146*^9, 3.798211969277957*^9}, {3.798212001473769*^9, 
   3.798212019314123*^9}, {3.798212407561322*^9, 3.7982124547759733`*^9}, {
   3.798212518027711*^9, 3.7982125477296658`*^9}, {3.798287565506304*^9, 
   3.7982875913124866`*^9}, {3.798376571116469*^9, 3.798376735388631*^9}, {
   3.798376773364771*^9, 3.798376830388838*^9}, 3.798376915466568*^9, 
   3.798457862273075*^9, {3.798458952634437*^9, 3.798458962627429*^9}, {
   3.79847273464456*^9, 3.798472736140647*^9}, {3.798643927620008*^9, 
   3.7986439361864023`*^9}, {3.798643974580682*^9, 3.7986439767102633`*^9}, {
   3.7986582857343483`*^9, 3.798658309085354*^9}, 3.7986583440196457`*^9},
 CellLabel->"In[14]:=",ExpressionUUID->"42e705b9-9df0-4697-ba68-dc7f16456f2a"],

Cell[BoxData[
 RowBox[{
  RowBox[{"EdiagramQuant", ":=", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", "exp", "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"exp", "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"mC", "===", "Null"}], ",", 
         RowBox[{
          RowBox[{"rescaler", "[", 
           RowBox[{"[", "2", "]"}], "]"}], "*", "100"}], ",", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"mF", "===", "mA"}], ",", 
           RowBox[{
            RowBox[{"rescaler", "[", 
             RowBox[{"[", "2", "]"}], "]"}], "*", "100"}], ",", 
           RowBox[{
            RowBox[{"rescaler", "[", 
             RowBox[{"[", "1", "]"}], "]"}], "*", "100"}]}], "]"}]}], "]"}]}],
       ";", "\[IndentingNewLine]", 
      RowBox[{"{", 
       RowBox[{"exp", ",", 
        RowBox[{"data", "[", "exp", "]"}]}], "}"}]}]}], "]"}]}], 
  ";"}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.790620474299243*^9, 3.7906205107413883`*^9}, {
   3.7906206878797693`*^9, 3.790620718817176*^9}, {3.790620767862656*^9, 
   3.790620770315949*^9}, {3.790620815373822*^9, 3.790620822574704*^9}, {
   3.790620902223796*^9, 3.7906209050333347`*^9}, {3.790620952980529*^9, 
   3.7906209730606623`*^9}, {3.79062103094584*^9, 3.79062114353183*^9}, {
   3.790621341885582*^9, 3.790621361205306*^9}, {3.79062142749581*^9, 
   3.790621430649418*^9}, {3.7906222262531233`*^9, 3.790622226389718*^9}, {
   3.790625645907642*^9, 3.790625646704568*^9}, {3.790625875895577*^9, 
   3.790625881480873*^9}, {3.790628687250792*^9, 3.790628720132971*^9}, {
   3.790628793989334*^9, 3.790628831310833*^9}, {3.7906289384526777`*^9, 
   3.79062894758772*^9}, {3.790629133830838*^9, 3.7906291441387663`*^9}, {
   3.790629192490897*^9, 3.790629197160941*^9}, {3.7906294035083714`*^9, 
   3.7906294337869663`*^9}, {3.790629465322442*^9, 3.790629473006502*^9}, {
   3.790629508073372*^9, 3.79062952825378*^9}, {3.7906310445168867`*^9, 
   3.790631067096712*^9}, {3.790631293504437*^9, 3.790631296767634*^9}, {
   3.790696273882522*^9, 3.790696281565401*^9}, {3.790696312783396*^9, 
   3.790696374334504*^9}, {3.790696585567691*^9, 3.790696586404784*^9}, {
   3.790697487312847*^9, 3.790697540308333*^9}, {3.79069768035441*^9, 
   3.790697739933785*^9}, {3.790697929086121*^9, 3.790697930086379*^9}, {
   3.790697967084723*^9, 3.7906979697653008`*^9}, {3.790698152502089*^9, 
   3.7906981662056837`*^9}, {3.790698216079871*^9, 3.7906982238891697`*^9}, {
   3.790699663848342*^9, 3.7906997011308193`*^9}, {3.7928684883503923`*^9, 
   3.7928684887516336`*^9}, {3.7928699694429493`*^9, 3.792869992330523*^9}, {
   3.7928700242647753`*^9, 3.792870025891518*^9}, {3.794763447740991*^9, 
   3.7947634539550877`*^9}, {3.795870265108611*^9, 3.795870377511342*^9}, {
   3.7958709595539427`*^9, 3.795871017907866*^9}, {3.795871896927395*^9, 
   3.795871904984659*^9}, {3.795872011242772*^9, 3.795872020403987*^9}, {
   3.79778803413947*^9, 3.7977881430250187`*^9}, {3.7977885361274633`*^9, 
   3.7977885446295443`*^9}, {3.797788641003112*^9, 3.797788673868656*^9}, {
   3.797790069705702*^9, 3.797790072456893*^9}, {3.797790254257587*^9, 
   3.797790273616757*^9}, {3.797790777022352*^9, 3.797790787264084*^9}, {
   3.797790942789403*^9, 3.79779096843758*^9}, {3.797791005475012*^9, 
   3.79779107865341*^9}, {3.797791173958006*^9, 3.797791308986642*^9}, {
   3.797791375627227*^9, 3.7977914551413918`*^9}, {3.797791567377646*^9, 
   3.797791591861189*^9}, {3.7978731383152857`*^9, 3.797873141206189*^9}, {
   3.797873201764011*^9, 3.7978732359090557`*^9}, {3.797954299374192*^9, 
   3.797954338473446*^9}, {3.79795439493626*^9, 3.7979544911563396`*^9}, {
   3.79795456961698*^9, 3.797954619882009*^9}, 3.797954657962882*^9, {
   3.797954921079303*^9, 3.797955129259302*^9}, 3.7979551618197927`*^9, {
   3.797955219544553*^9, 3.797955260126645*^9}, {3.797955315609676*^9, 
   3.7979553456527233`*^9}, {3.797955377730648*^9, 3.797955393018675*^9}, {
   3.797955430973686*^9, 3.797955431586011*^9}, {3.797955487007346*^9, 
   3.797955654527829*^9}, 3.797955711713141*^9, {3.7979557664900007`*^9, 
   3.797955812801531*^9}, {3.797959894540781*^9, 3.797959920754421*^9}, {
   3.797960467739088*^9, 3.797960474684504*^9}, {3.7979605807779016`*^9, 
   3.7979607109841127`*^9}, {3.797960853724164*^9, 3.797961072252966*^9}, {
   3.7979611096598673`*^9, 3.797961409340308*^9}, {3.798033362122616*^9, 
   3.7980334531934*^9}, {3.798033580827565*^9, 3.798033593696496*^9}, {
   3.798033646175838*^9, 3.798033706681163*^9}, {3.798033748102229*^9, 
   3.798033969832798*^9}, 3.798034084778946*^9, {3.798035482066085*^9, 
   3.798035482173848*^9}, {3.798035563603163*^9, 3.798035576584087*^9}, {
   3.798036432543841*^9, 3.798036447868127*^9}, {3.7980365776467657`*^9, 
   3.7980365779855013`*^9}, {3.7980368325888147`*^9, 3.798036844082562*^9}, {
   3.798036935361628*^9, 3.7980369406984386`*^9}, {3.79803709065823*^9, 
   3.798037094818115*^9}, {3.7980371279701633`*^9, 3.798037135451708*^9}, {
   3.798037284314077*^9, 3.7980372904583673`*^9}, {3.798037605959673*^9, 
   3.798037609403494*^9}, 3.798197682430941*^9, {3.798197784757482*^9, 
   3.798197788411091*^9}, {3.79819784776612*^9, 3.79819785990821*^9}, {
   3.798198506536005*^9, 3.798198507437817*^9}, 3.798199702198937*^9, {
   3.798202087963572*^9, 3.798202173240767*^9}, {3.798202209665213*^9, 
   3.798202348634652*^9}, {3.798203296818458*^9, 3.798203353366563*^9}, {
   3.798203404302808*^9, 3.798203432699164*^9}, {3.798203530295865*^9, 
   3.798203551185905*^9}, {3.798203671079392*^9, 3.798203702892497*^9}, {
   3.798203758362561*^9, 3.798203763018443*^9}, {3.798203866237639*^9, 
   3.798203867810542*^9}, {3.798204114361752*^9, 3.798204153048414*^9}, {
   3.7982041868054657`*^9, 3.798204255450961*^9}, {3.798209715332099*^9, 
   3.798209769824154*^9}, {3.798209820439756*^9, 3.798209838801743*^9}, {
   3.798209984556196*^9, 3.798210001935996*^9}, {3.798210156206408*^9, 
   3.798210159389902*^9}, {3.798210206788641*^9, 3.798210233356786*^9}, {
   3.798211961276146*^9, 3.798211969277957*^9}, {3.798212001473769*^9, 
   3.798212019314123*^9}, {3.798212407561322*^9, 3.7982124547759733`*^9}, {
   3.798212518027711*^9, 3.7982125477296658`*^9}, {3.798212984166486*^9, 
   3.7982130060491247`*^9}, {3.798287607171337*^9, 3.798287614634459*^9}, {
   3.7983768646191397`*^9, 3.798376896215197*^9}, 3.798457857746122*^9, {
   3.7984589725729017`*^9, 3.798458972921232*^9}},
 CellLabel->"In[15]:=",ExpressionUUID->"8a63fa82-e524-42da-a705-3aebf404fd5c"],

Cell[BoxData[
 RowBox[{"activityCalc", ":=", 
  RowBox[{"Quiet", "@", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"exp", ",", "\[CapitalDelta]E", ",", "actSolve", ",", "molOx"}],
       "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"exp", "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"mC", "===", "Null"}], ",", 
         RowBox[{
          RowBox[{"rescaler", "[", 
           RowBox[{"[", "2", "]"}], "]"}], "*", "100"}], ",", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"mF", "===", "mA"}], ",", 
           RowBox[{
            RowBox[{"rescaler", "[", 
             RowBox[{"[", "2", "]"}], "]"}], "*", "100"}], ",", 
           RowBox[{
            RowBox[{"rescaler", "[", 
             RowBox[{"[", "1", "]"}], "]"}], "*", "100"}]}], "]"}]}], "]"}]}],
       ";", "\[IndentingNewLine]", 
      RowBox[{"molOx", "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"diamono", "\[Equal]", "\"\<monotomic\>\""}], ",", "1", ",", 
         "2"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"\[CapitalDelta]E", "=", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"readtext", "[", "mA", "]"}], "-", 
          RowBox[{"R", "*", 
           RowBox[{"T", "/", 
            RowBox[{"(", 
             RowBox[{"nA", "*", "F"}], ")"}]}], "*", 
           RowBox[{"Log", "[", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{"amA", "*", 
               RowBox[{"pOx", "^", 
                RowBox[{"(", 
                 RowBox[{"nA", "/", 
                  RowBox[{"(", 
                   RowBox[{"nOx", "*", "molOx"}], ")"}]}], ")"}]}]}], ")"}], 
             "/", 
             RowBox[{"(", 
              RowBox[{"aOxA", "^", 
               RowBox[{"(", 
                RowBox[{"nA", "/", 
                 RowBox[{"LCM", "[", 
                  RowBox[{"nA", ",", "nOx"}], "]"}]}], ")"}]}], ")"}]}], 
            "]"}]}]}], ")"}], "-", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"readtext", "[", "mB", "]"}], "-", 
          RowBox[{"R", "*", 
           RowBox[{"T", "/", 
            RowBox[{"(", 
             RowBox[{"nB", "*", "F"}], ")"}]}], "*", 
           RowBox[{"Log", "[", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{"amB", "*", 
               RowBox[{"pOx", "^", 
                RowBox[{"(", 
                 RowBox[{"nB", "/", 
                  RowBox[{"(", 
                   RowBox[{"nOx", "*", "molOx"}], ")"}]}], ")"}]}]}], ")"}], 
             "/", 
             RowBox[{"(", 
              RowBox[{"aOxB", "^", 
               RowBox[{"(", 
                RowBox[{"nB", "/", 
                 RowBox[{"LCM", "[", 
                  RowBox[{"nB", ",", "nOx"}], "]"}]}], ")"}]}], ")"}]}], 
            "]"}]}]}], ")"}]}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"actSolve", "=", 
       RowBox[{"aOxB", "/.", 
        RowBox[{"Flatten", "[", 
         RowBox[{
          RowBox[{"Solve", "[", 
           RowBox[{
            RowBox[{"\[CapitalDelta]E", "\[Equal]", 
             RowBox[{"data", "[", "exp", "]"}]}], ",", "aOxB"}], "]"}], "/.", 
          
          RowBox[{"{", 
           RowBox[{
            RowBox[{"aOxA", "\[Rule]", " ", 
             RowBox[{"rescaler", "[", 
              RowBox[{"[", "3", "]"}], "]"}]}], ",", 
            RowBox[{"amA", "\[Rule]", " ", "1"}], ",", 
            RowBox[{"amB", "\[Rule]", " ", "1"}], ",", 
            RowBox[{"pOx", "\[Rule]", " ", "partialpressure"}]}], "}"}]}], 
         "]"}]}]}]}]}], "]"}]}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.790620474299243*^9, 3.7906205107413883`*^9}, {
   3.7906206878797693`*^9, 3.790620718817176*^9}, {3.790620767862656*^9, 
   3.790620770315949*^9}, {3.790620815373822*^9, 3.790620822574704*^9}, {
   3.790620902223796*^9, 3.7906209050333347`*^9}, {3.790620952980529*^9, 
   3.7906209730606623`*^9}, {3.79062103094584*^9, 3.79062114353183*^9}, {
   3.790621341885582*^9, 3.790621361205306*^9}, {3.79062142749581*^9, 
   3.790621430649418*^9}, {3.7906222262531233`*^9, 3.790622226389718*^9}, {
   3.790625645907642*^9, 3.790625646704568*^9}, {3.790625875895577*^9, 
   3.790625881480873*^9}, {3.790628687250792*^9, 3.790628720132971*^9}, {
   3.790628793989334*^9, 3.790628831310833*^9}, {3.7906289384526777`*^9, 
   3.79062894758772*^9}, {3.790629133830838*^9, 3.7906291441387663`*^9}, {
   3.790629192490897*^9, 3.790629197160941*^9}, {3.7906294035083714`*^9, 
   3.7906294337869663`*^9}, {3.790629465322442*^9, 3.790629473006502*^9}, {
   3.790629508073372*^9, 3.79062952825378*^9}, {3.7906310445168867`*^9, 
   3.790631067096712*^9}, {3.790631293504437*^9, 3.790631296767634*^9}, {
   3.790696273882522*^9, 3.790696281565401*^9}, {3.790696312783396*^9, 
   3.790696374334504*^9}, {3.790696585567691*^9, 3.790696586404784*^9}, {
   3.790697487312847*^9, 3.790697540308333*^9}, {3.79069768035441*^9, 
   3.790697739933785*^9}, {3.790697929086121*^9, 3.790697930086379*^9}, {
   3.790697967084723*^9, 3.7906979697653008`*^9}, {3.790698152502089*^9, 
   3.7906981662056837`*^9}, {3.790698216079871*^9, 3.7906982238891697`*^9}, {
   3.790699663848342*^9, 3.7906997011308193`*^9}, {3.7928684883503923`*^9, 
   3.7928684887516336`*^9}, {3.7928699694429493`*^9, 3.792869992330523*^9}, {
   3.7928700242647753`*^9, 3.792870025891518*^9}, {3.794763447740991*^9, 
   3.7947634539550877`*^9}, {3.795870265108611*^9, 3.795870377511342*^9}, {
   3.7958709595539427`*^9, 3.795871017907866*^9}, {3.795871896927395*^9, 
   3.795871904984659*^9}, {3.795872011242772*^9, 3.795872020403987*^9}, {
   3.79778803413947*^9, 3.7977881430250187`*^9}, {3.7977885361274633`*^9, 
   3.7977885446295443`*^9}, {3.797788641003112*^9, 3.797788673868656*^9}, {
   3.797790069705702*^9, 3.797790072456893*^9}, {3.797790254257587*^9, 
   3.797790273616757*^9}, {3.797790777022352*^9, 3.797790787264084*^9}, {
   3.797790942789403*^9, 3.79779096843758*^9}, {3.797791005475012*^9, 
   3.79779107865341*^9}, {3.797791173958006*^9, 3.797791308986642*^9}, {
   3.797791375627227*^9, 3.7977914551413918`*^9}, {3.797791567377646*^9, 
   3.797791591861189*^9}, {3.7978731383152857`*^9, 3.797873141206189*^9}, {
   3.797873201764011*^9, 3.7978732359090557`*^9}, {3.797954299374192*^9, 
   3.797954338473446*^9}, {3.79795439493626*^9, 3.7979544911563396`*^9}, {
   3.79795456961698*^9, 3.797954619882009*^9}, 3.797954657962882*^9, {
   3.797954921079303*^9, 3.797955129259302*^9}, 3.7979551618197927`*^9, {
   3.797955219544553*^9, 3.797955260126645*^9}, {3.797955315609676*^9, 
   3.7979553456527233`*^9}, {3.797955377730648*^9, 3.797955393018675*^9}, {
   3.797955430973686*^9, 3.797955431586011*^9}, {3.797955487007346*^9, 
   3.797955654527829*^9}, 3.797955711713141*^9, {3.7979557664900007`*^9, 
   3.797955812801531*^9}, {3.797959894540781*^9, 3.797959920754421*^9}, {
   3.797960467739088*^9, 3.797960474684504*^9}, {3.7979605807779016`*^9, 
   3.7979607109841127`*^9}, {3.797960853724164*^9, 3.797961072252966*^9}, {
   3.7979611096598673`*^9, 3.797961409340308*^9}, {3.798033362122616*^9, 
   3.7980334531934*^9}, {3.798033580827565*^9, 3.798033593696496*^9}, {
   3.798033646175838*^9, 3.798033706681163*^9}, {3.798033748102229*^9, 
   3.798033969832798*^9}, 3.798034084778946*^9, {3.798035482066085*^9, 
   3.798035482173848*^9}, {3.798035563603163*^9, 3.798035576584087*^9}, {
   3.798036432543841*^9, 3.798036447868127*^9}, {3.7980365776467657`*^9, 
   3.7980365779855013`*^9}, {3.7980368325888147`*^9, 3.798036844082562*^9}, {
   3.798036935361628*^9, 3.7980369406984386`*^9}, {3.79803709065823*^9, 
   3.798037094818115*^9}, {3.7980371279701633`*^9, 3.798037135451708*^9}, {
   3.798037284314077*^9, 3.7980372904583673`*^9}, {3.798037605959673*^9, 
   3.798037609403494*^9}, 3.798197682430941*^9, {3.798197784757482*^9, 
   3.798197788411091*^9}, {3.79819784776612*^9, 3.79819785990821*^9}, {
   3.798198506536005*^9, 3.798198507437817*^9}, 3.798199702198937*^9, {
   3.798202087963572*^9, 3.798202173240767*^9}, {3.798202209665213*^9, 
   3.798202348634652*^9}, {3.798203296818458*^9, 3.798203353366563*^9}, {
   3.798203404302808*^9, 3.798203432699164*^9}, {3.798203530295865*^9, 
   3.798203551185905*^9}, {3.798203671079392*^9, 3.798203702892497*^9}, {
   3.798203758362561*^9, 3.798203763018443*^9}, {3.798203866237639*^9, 
   3.798203867810542*^9}, {3.798204114361752*^9, 3.798204153048414*^9}, {
   3.7982041868054657`*^9, 3.798204255450961*^9}, {3.798209715332099*^9, 
   3.798209769824154*^9}, {3.798209820439756*^9, 3.798209838801743*^9}, {
   3.798209984556196*^9, 3.798210001935996*^9}, {3.798210156206408*^9, 
   3.798210159389902*^9}, {3.798210206788641*^9, 3.798210233356786*^9}, {
   3.798211961276146*^9, 3.798211969277957*^9}, {3.798212001473769*^9, 
   3.798212019314123*^9}, {3.798212407561322*^9, 3.7982124547759733`*^9}, {
   3.798212518027711*^9, 3.7982125477296658`*^9}, {3.798212984166486*^9, 
   3.7982130060491247`*^9}, {3.798213814869175*^9, 3.798213817576091*^9}, {
   3.798287630790699*^9, 3.79828763092778*^9}, {3.7982879993845*^9, 
   3.798288007697425*^9}, 3.7982890962002983`*^9, {3.798292532521628*^9, 
   3.7982925564405127`*^9}, {3.798292808922472*^9, 3.798292826659318*^9}, 
   3.798293231320445*^9, {3.798298056877132*^9, 3.798298061283004*^9}, {
   3.7982982044608507`*^9, 3.798298210403068*^9}, {3.798300904281958*^9, 
   3.7983009939806223`*^9}, {3.798305490522518*^9, 3.7983055194629*^9}, {
   3.79830556346157*^9, 3.798305611976478*^9}, {3.7983056479393272`*^9, 
   3.79830569645115*^9}, {3.798305726902807*^9, 3.7983058665968227`*^9}, {
   3.7983059388818913`*^9, 3.798305969321515*^9}, {3.79830600892424*^9, 
   3.7983060432896338`*^9}, {3.798306170855296*^9, 3.798306352539177*^9}, {
   3.798306550662532*^9, 3.7983065532012*^9}, {3.798306616052541*^9, 
   3.798306623659355*^9}, {3.79830670609833*^9, 3.798306740983749*^9}, {
   3.7983068832983103`*^9, 3.798306883851993*^9}, {3.798306963638797*^9, 
   3.798307031061363*^9}, {3.798376940419155*^9, 3.798377005347436*^9}, {
   3.798377342047694*^9, 3.7983773775522327`*^9}, {3.798377479911343*^9, 
   3.798377504503091*^9}, {3.798377555526688*^9, 3.798377565751108*^9}, 
   3.798377641878977*^9, 3.79845785958971*^9, {3.7984589817261343`*^9, 
   3.79845898203855*^9}, {3.798459376175292*^9, 3.798459378822256*^9}, {
   3.798464136207437*^9, 3.79846414246607*^9}, {3.798473194184931*^9, 
   3.798473213999452*^9}, {3.798473347798951*^9, 3.7984733496789*^9}, {
   3.798473923593834*^9, 3.7984739344078093`*^9}, {3.7984741024177837`*^9, 
   3.798474103972829*^9}, {3.80021760423452*^9, 3.800217604795682*^9}, {
   3.800218079828483*^9, 3.8002180811497803`*^9}, {3.80021830714223*^9, 
   3.800218308262721*^9}, {3.800278315200151*^9, 3.800278315834152*^9}, {
   3.800290630198835*^9, 3.800290649767673*^9}},
 CellLabel->"In[16]:=",ExpressionUUID->"d8ab1164-e2eb-4be6-8c8e-05e4e5751014"],

Cell[BoxData[
 RowBox[{"\[Gamma]Calc", ":=", 
  RowBox[{"activityCalc", "/", 
   RowBox[{"rescaler", "[", 
    RowBox[{"[", "4", "]"}], "]"}]}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.798459358532436*^9, 3.798459397614666*^9}},
 CellLabel->"In[17]:=",ExpressionUUID->"0424a10f-b838-4f9a-94c2-812959f59bcf"],

Cell[BoxData[
 RowBox[{"EdiagramActivity", ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", "exp", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"exp", "=", 
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"mC", "===", "Null"}], ",", 
        RowBox[{
         RowBox[{"rescaler", "[", 
          RowBox[{"[", "2", "]"}], "]"}], "*", "100"}], ",", 
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{"mF", "===", "mA"}], ",", 
          RowBox[{
           RowBox[{"rescaler", "[", 
            RowBox[{"[", "2", "]"}], "]"}], "*", "100"}], ",", 
          RowBox[{
           RowBox[{"rescaler", "[", 
            RowBox[{"[", "1", "]"}], "]"}], "*", "100"}]}], "]"}]}], "]"}]}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{"Legended", "[", 
      RowBox[{
       RowBox[{"Plot", "[", 
        RowBox[{
         RowBox[{"data", "[", "x", "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "0", ",", 
           RowBox[{"If", "[", 
            RowBox[{
             RowBox[{"exp", "<", "50"}], ",", 
             RowBox[{"exp", "*", "2"}], ",", "100"}], "]"}]}], "}"}], ",", 
         RowBox[{"PlotStyle", "\[Rule]", 
          RowBox[{"Directive", "[", 
           RowBox[{"Black", ",", 
            RowBox[{"Thickness", "[", "0.015", "]"}]}], "]"}]}], ",", 
         RowBox[{"Frame", "\[Rule]", "True"}], ",", 
         RowBox[{"FrameLabel", "\[Rule]", "  ", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"StringJoin", "[", 
             RowBox[{"{", 
              RowBox[{"\"\<mol% \>\"", ",", 
               RowBox[{"If", "[", 
                RowBox[{
                 RowBox[{"mA", "===", "mF"}], ",", "mB", ",", 
                 RowBox[{"If", "[", 
                  RowBox[{
                   RowBox[{"mB", "===", "mF"}], ",", "mA", ",", "mB"}], 
                  "]"}]}], "]"}], ",", "\"\< in cathode  \>\"", ",", 
               RowBox[{"If", "[", 
                RowBox[{
                 RowBox[{"mC", "===", "Null"}], ",", "\"\<\>\"", ",", 
                 RowBox[{"StringJoin", "[", 
                  RowBox[{
                  "\"\<\\!\\(\>\"", ",", "mC", ",", "\"\<\\/(\>\"", ",", "mC",
                    ",", "\"\<+\>\"", ",", "mF", ",", "\"\<)\\)\>\"", ",", 
                   "\"\<=\>\"", ",", 
                   RowBox[{"ToString", "[", 
                    RowBox[{"Round", "[", 
                    RowBox[{
                    RowBox[{"xCathode", "/", "100"}], ",", "0.01"}], "]"}], 
                    "]"}]}], "]"}]}], "]"}]}], "}"}], "]"}], ",", 
            RowBox[{"StringJoin", "[", 
             RowBox[{
              RowBox[{"ToString", "[", 
               RowBox[{
                RowBox[{"Subscript", "[", 
                 RowBox[{"\"\<\[CapitalDelta]E\>\"", ",", "mA"}], "]"}], ",", 
                "StandardForm"}], "]"}], ",", "\"\< -\>\"", ",", 
              RowBox[{"ToString", "[", 
               RowBox[{
                RowBox[{"Subscript", "[", 
                 RowBox[{"\"\<\[CapitalDelta]E\>\"", ",", "mB"}], "]"}], ",", 
                "StandardForm"}], "]"}], ",", "\"\<  (V)\>\""}], "]"}]}], 
           "}"}]}], ",", 
         RowBox[{"LabelStyle", "\[Rule]", 
          RowBox[{"Directive", "[", 
           RowBox[{"Bold", ",", "Black", ",", "Large", ",", 
            RowBox[{"FontFamily", "\[Rule]", " ", "\"\<Helvetica\>\""}]}], 
           "]"}]}], ",", 
         RowBox[{"ImageSize", "\[Rule]", "700"}], ",", 
         RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", 
         RowBox[{"Epilog", "\[Rule]", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"PointSize", "[", "0.06", "]"}], ",", "Red", ",", 
            RowBox[{"Point", "[", 
             RowBox[{"{", 
              RowBox[{"exp", ",", 
               RowBox[{"data", "[", "exp", "]"}]}], "}"}], "]"}]}], "}"}]}]}],
         "]"}], ",", 
       RowBox[{"Placed", "[", 
        RowBox[{
         RowBox[{"Framed", "[", 
          RowBox[{
           RowBox[{"Style", "[", 
            RowBox[{
             RowBox[{"Grid", "[", 
              RowBox[{"{", 
               RowBox[{
                RowBox[{"{", 
                 RowBox[{
                  RowBox[{"ToString", "[", 
                   RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"\"\<a\>\"", ",", 
                    RowBox[{"StringJoin", "[", 
                    RowBox[{
                    RowBox[{"ToString", "[", 
                    RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"mB", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{"nB", "/", "nOx"}], "\[Equal]", "1"}], ",", 
                    "\"\<\>\"", ",", 
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nB", ",", "nOx"}], "]"}], "/", "nB"}]}], "]"}]}],
                     "]"}], ",", "StandardForm"}], "]"}], ",", 
                    RowBox[{"ToString", "[", 
                    RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"mOx", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{"nB", "/", "nOx"}], "\[Equal]", "1"}], ",", 
                    "\"\<\>\"", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nB", ",", "nOx"}], "]"}], "/", "nOx"}], 
                    "\[Equal]", "1"}], ",", "\"\<\>\"", ",", 
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nB", ",", "nOx"}], "]"}], "/", "nOx"}]}], 
                    "]"}]}], "]"}]}], "]"}], ",", "StandardForm"}], "]"}]}], 
                    "]"}]}], "]"}], ",", "StandardForm"}], "]"}], ",", 
                  "\"\<=\>\"", ",", 
                  RowBox[{"Round", "[", 
                   RowBox[{"activityCalc", ",", "0.0001"}], "]"}]}], "}"}], 
                ",", 
                RowBox[{"{", 
                 RowBox[{
                  RowBox[{"ToString", "[", 
                   RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"\"\<a\>\"", ",", 
                    RowBox[{"StringJoin", "[", 
                    RowBox[{
                    RowBox[{"ToString", "[", 
                    RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"mA", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{"nA", "/", "nOx"}], "\[Equal]", "1"}], ",", 
                    "\"\<\>\"", ",", 
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nA", ",", "nOx"}], "]"}], "/", "nA"}]}], "]"}]}],
                     "]"}], ",", "StandardForm"}], "]"}], ",", 
                    RowBox[{"ToString", "[", 
                    RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"mOx", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{"nA", "/", "nOx"}], "\[Equal]", "1"}], ",", 
                    "\"\<\>\"", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nA", ",", "nOx"}], "]"}], "/", "nOx"}], 
                    "\[Equal]", "1"}], ",", "\"\<\>\"", ",", 
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nA", ",", "nOx"}], "]"}], "/", "nOx"}]}], 
                    "]"}]}], "]"}]}], "]"}], ",", "StandardForm"}], "]"}]}], 
                    "]"}]}], "]"}], ",", "StandardForm"}], "]"}], ",", 
                  "\"\<=\>\"", ",", 
                  RowBox[{"Round", "[", 
                   RowBox[{
                    RowBox[{"rescaler", "[", 
                    RowBox[{"[", "3", "]"}], "]"}], ",", "0.001"}], "]"}]}], 
                 "}"}], ",", 
                RowBox[{"{", 
                 RowBox[{
                  RowBox[{"ToString", "[", 
                   RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"\"\<x\>\"", ",", 
                    RowBox[{"StringJoin", "[", 
                    RowBox[{
                    RowBox[{"ToString", "[", 
                    RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"mB", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{"nB", "/", "nOx"}], "\[Equal]", "1"}], ",", 
                    "\"\<\>\"", ",", 
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nB", ",", "nOx"}], "]"}], "/", "nB"}]}], "]"}]}],
                     "]"}], ",", "StandardForm"}], "]"}], ",", 
                    RowBox[{"ToString", "[", 
                    RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"mOx", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{"nB", "/", "nOx"}], "\[Equal]", "1"}], ",", 
                    "\"\<\>\"", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nB", ",", "nOx"}], "]"}], "/", "nOx"}], 
                    "\[Equal]", "1"}], ",", "\"\<\>\"", ",", 
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nB", ",", "nOx"}], "]"}], "/", "nOx"}]}], 
                    "]"}]}], "]"}]}], "]"}], ",", "StandardForm"}], "]"}]}], 
                    "]"}]}], "]"}], ",", "StandardForm"}], "]"}], ",", 
                  "\"\<=\>\"", ",", 
                  RowBox[{"Round", "[", 
                   RowBox[{
                    RowBox[{"rescaler", "[", 
                    RowBox[{"[", "4", "]"}], "]"}], ",", "0.001"}], "]"}]}], 
                 "}"}], ",", 
                RowBox[{"{", 
                 RowBox[{
                  RowBox[{"ToString", "[", 
                   RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"\"\<x\>\"", ",", 
                    RowBox[{"StringJoin", "[", 
                    RowBox[{
                    RowBox[{"ToString", "[", 
                    RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"mA", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{"nA", "/", "nOx"}], "\[Equal]", "1"}], ",", 
                    "\"\<\>\"", ",", 
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nA", ",", "nOx"}], "]"}], "/", "nA"}]}], "]"}]}],
                     "]"}], ",", "StandardForm"}], "]"}], ",", 
                    RowBox[{"ToString", "[", 
                    RowBox[{
                    RowBox[{"Subscript", "[", 
                    RowBox[{"mOx", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{"nA", "/", "nOx"}], "\[Equal]", "1"}], ",", 
                    "\"\<\>\"", ",", 
                    RowBox[{"If", "[", 
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nA", ",", "nOx"}], "]"}], "/", "nOx"}], 
                    "\[Equal]", "1"}], ",", "\"\<\>\"", ",", 
                    RowBox[{
                    RowBox[{"LCM", "[", 
                    RowBox[{"nA", ",", "nOx"}], "]"}], "/", "nOx"}]}], 
                    "]"}]}], "]"}]}], "]"}], ",", "StandardForm"}], "]"}]}], 
                    "]"}]}], "]"}], ",", "StandardForm"}], "]"}], ",", 
                  "\"\<=\>\"", ",", 
                  RowBox[{"Round", "[", 
                   RowBox[{
                    RowBox[{"rescaler", "[", 
                    RowBox[{"[", "3", "]"}], "]"}], ",", "0.001"}], "]"}]}], 
                 "}"}]}], "}"}], "]"}], ",", 
             RowBox[{"Directive", "[", 
              RowBox[{"Bold", ",", "Black", ",", "Large", ",", 
               RowBox[{"FontFamily", "\[Rule]", " ", "\"\<Helvetica\>\""}]}], 
              "]"}]}], "]"}], ",", 
           RowBox[{"Background", "\[Rule]", " ", "White"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"0.8", ",", "0.7"}], "}"}]}], "]"}]}], "]"}]}]}], 
   "]"}]}]], "Input",
 InitializationCell->True,
 CellChangeTimes->{{3.798462765862874*^9, 3.7984627870597963`*^9}, 
   3.7984628646351643`*^9, {3.7984632431342487`*^9, 3.798463259074275*^9}, {
   3.7984633097653227`*^9, 3.798463358443742*^9}, {3.798463389517331*^9, 
   3.7984634053863173`*^9}, {3.7984634971914797`*^9, 3.798463498359479*^9}, {
   3.798463545527969*^9, 3.798463557147438*^9}, {3.798463587801495*^9, 
   3.798463607887747*^9}, {3.7984636743722763`*^9, 3.7984636889581947`*^9}, {
   3.7984637606603193`*^9, 3.798463832665619*^9}, {3.798463937523252*^9, 
   3.7984639729581738`*^9}, {3.7984640069029703`*^9, 3.798464025999004*^9}, {
   3.798464058788495*^9, 3.7984641146647997`*^9}, {3.798464148782709*^9, 
   3.798464208679796*^9}, {3.798464260933825*^9, 3.7984643588071833`*^9}, {
   3.798464410690673*^9, 3.7984644713928633`*^9}, {3.798464537436453*^9, 
   3.798464572676443*^9}, {3.798464604310584*^9, 3.798464646695898*^9}, 
   3.798468939765201*^9, {3.7984727469791927`*^9, 3.7984727529974623`*^9}, {
   3.798477493847705*^9, 3.798477514618442*^9}, 3.798652413745138*^9, {
   3.798653234211481*^9, 3.798653253478986*^9}, {3.798653417995557*^9, 
   3.798653473374002*^9}, {3.798653515780295*^9, 3.7986535284930067`*^9}, {
   3.798818554478644*^9, 3.7988185649907503`*^9}, {3.798818678308631*^9, 
   3.798818776912417*^9}, 3.798911031480789*^9, {3.800735060429982*^9, 
   3.800735144707024*^9}, {3.800735188120194*^9, 3.8007352418792677`*^9}, {
   3.800735273852888*^9, 3.8007352912634287`*^9}, {3.800735321504669*^9, 
   3.800735361368294*^9}, {3.803834103939896*^9, 3.803834106106799*^9}, 
   3.803837992165286*^9, 3.803840857270808*^9, {3.803842642143112*^9, 
   3.803842643615366*^9}},
 CellLabel->"In[18]:=",ExpressionUUID->"7355f935-e13e-4e39-ba3e-dc7c917e55f2"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"readtext", "[", "mA", "]"}], "-", 
  RowBox[{"readtext", "[", "mB", "]"}]}]], "Input",
 CellChangeTimes->{{3.806767451175975*^9, 3.8067674539215603`*^9}, {
  3.806770080830634*^9, 3.806770084445129*^9}, {3.8073743833775063`*^9, 
  3.8073743841154547`*^9}},
 CellLabel->"In[40]:=",ExpressionUUID->"c551302a-cce1-40c4-9bf0-19ce2d355ddf"],

Cell[BoxData["0.00972030303528637`"], "Output",
 CellChangeTimes->{3.806767454275581*^9, 3.806770084844796*^9, 
  3.8073743852843924`*^9},
 CellLabel->"Out[40]=",ExpressionUUID->"7a7a7b9f-7bd2-4cd5-b7cc-fd35d159b502"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"readtext", "[", "mA", "]"}]], "Input",
 CellChangeTimes->{{3.807374386162881*^9, 3.807374388897629*^9}},
 CellLabel->"In[41]:=",ExpressionUUID->"9d26c1b9-aa97-4e7f-83cb-c1145b55fbbe"],

Cell[BoxData[
 RowBox[{"-", "2.470877470130155`"}]], "Output",
 CellChangeTimes->{3.807374389140606*^9},
 CellLabel->"Out[41]=",ExpressionUUID->"3de4dc41-8d3e-4cf0-9663-aa66d2163706"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]]
},
WindowSize->{1006, 767},
WindowMargins->{{Automatic, 16}, {Automatic, 0}},
FrontEndVersion->"12.1 for Mac OS X x86 (64-bit) (June 19, 2020)",
StyleDefinitions->"Default.nb",
ExpressionUUID->"795bafc4-8e4e-436b-91e3-f9655f6eb0c8"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 189, 3, 98, "Title",ExpressionUUID->"32d9e6ef-774a-4d56-8931-d7d7a13607b6"],
Cell[772, 27, 1223, 21, 219, "Text",ExpressionUUID->"ffe88410-edca-40aa-9a3c-6798e7c4bbc5"],
Cell[CellGroupData[{
Cell[2020, 52, 219, 4, 67, "Section",ExpressionUUID->"17e57d52-0b7f-4f8f-8243-f86eb1b1d02c"],
Cell[2242, 58, 1278, 23, 242, "Text",ExpressionUUID->"8a9184aa-eecf-4a83-b0b9-b6377d72dd0e"]
}, Open  ]],
Cell[CellGroupData[{
Cell[3557, 86, 252, 4, 67, "Section",ExpressionUUID->"876be60e-d363-411e-a275-068876498a08"],
Cell[CellGroupData[{
Cell[3834, 94, 193, 3, 54, "Subsection",ExpressionUUID->"5ccde8a6-107a-4149-bfc9-6fae6c6db160"],
Cell[4030, 99, 890, 15, 81, "Text",ExpressionUUID->"78d0787f-fe76-4c8f-ba0c-2e5e3c5029ba"]
}, Open  ]],
Cell[CellGroupData[{
Cell[4957, 119, 191, 3, 54, "Subsection",ExpressionUUID->"54bc6fca-5c22-4fe3-9889-85033b1f6643"],
Cell[5151, 124, 1675, 33, 311, "Text",ExpressionUUID->"a2b9b9a2-71b0-4c9e-867d-9676d3dd33f8"],
Cell[6829, 159, 1872, 26, 76, "Input",ExpressionUUID->"f3e84a73-d3e3-4ae7-8ad6-02bcb1c996d9"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8738, 190, 174, 3, 54, "Subsection",ExpressionUUID->"84c57191-9e00-4aec-8285-cf8c21ec009f"],
Cell[8915, 195, 708, 12, 104, "Text",ExpressionUUID->"eb5661ce-a565-4749-8157-1ac23907b932"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[9672, 213, 218, 4, 67, "Section",ExpressionUUID->"3e66200f-7768-4fec-bf54-5ba6e9648884"],
Cell[9893, 219, 594, 10, 58, "Text",ExpressionUUID->"57945187-9795-456b-924e-9779f16492f5"],
Cell[CellGroupData[{
Cell[10512, 233, 1313, 19, 46, "Input",ExpressionUUID->"40b09f6e-2161-4081-a3d9-e0210edfdd12"],
Cell[11828, 254, 1372, 22, 24, "Message",ExpressionUUID->"fb299938-72f3-4070-901c-e3ba8a314b25"],
Cell[13203, 278, 9661, 173, 455, "Output",ExpressionUUID->"623a7cac-b1be-4c44-8320-ad5c6400f2ed"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[22913, 457, 171, 3, 67, "Section",ExpressionUUID->"c67f9385-dab5-465e-a3d7-094699723805"],
Cell[23087, 462, 820, 13, 81, "Text",ExpressionUUID->"211d7850-09ce-42a9-95ec-02d21bc54a38"],
Cell[23910, 477, 721, 14, 104, "Text",ExpressionUUID->"ab46d4fd-3e51-40f3-8e51-88185b3a1de5"],
Cell[CellGroupData[{
Cell[24656, 495, 236, 3, 30, "Input",ExpressionUUID->"4e0cdbdd-b786-454c-841d-ba6cfbd3b8c9"],
Cell[24895, 500, 1594, 26, 24, "Message",ExpressionUUID->"6bb7cbef-c08c-45b0-b504-b94d670e514e"],
Cell[26492, 528, 8431, 159, 455, "Output",ExpressionUUID->"98e85bcc-a6a8-4778-8e5f-c0301aab6df7"]
}, Open  ]],
Cell[34938, 690, 279, 6, 35, "Text",ExpressionUUID->"646517a9-dd86-4289-a353-cfde9fd5b726"],
Cell[CellGroupData[{
Cell[35242, 700, 200, 4, 30, "Input",ExpressionUUID->"f65e02d8-659c-4851-9f41-0a7bf70799dd"],
Cell[35445, 706, 286, 4, 34, "Output",ExpressionUUID->"939dc15e-caad-4ae4-82e9-addadd617b81"]
}, Open  ]],
Cell[CellGroupData[{
Cell[35768, 715, 381, 5, 30, "Input",ExpressionUUID->"90ed716f-d922-4d69-ac76-faa2729247ff"],
Cell[36152, 722, 1596, 25, 34, "Output",ExpressionUUID->"a09611b4-842a-45ce-adef-ef2ad8d25e45"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[37797, 753, 172, 3, 67, "Section",ExpressionUUID->"ab3817be-b34b-4027-b15d-880404cd3df1"],
Cell[37972, 758, 713, 14, 58, "Text",ExpressionUUID->"ef424e6d-c2a4-44ed-ac9b-8fc7c509dd19"],
Cell[CellGroupData[{
Cell[38710, 776, 186, 3, 54, "Subsection",ExpressionUUID->"60d1dfc6-2182-49b7-9b79-730abbedba98"],
Cell[38899, 781, 1742, 54, 242, "Text",ExpressionUUID->"914909b3-c86f-46b4-a1ad-8692cc50057d"]
}, Open  ]],
Cell[CellGroupData[{
Cell[40678, 840, 186, 3, 54, "Subsection",ExpressionUUID->"00717a8f-6661-427f-8109-ab559a5a6942"],
Cell[CellGroupData[{
Cell[40889, 847, 239, 3, 30, "Input",ExpressionUUID->"85b6bb6a-eac9-45a7-b52b-26dff72c80ff"],
Cell[41131, 852, 2244, 35, 24, "Message",ExpressionUUID->"92653f04-563e-4a0a-bfc0-7352463a6a9b"],
Cell[43378, 889, 20879, 389, 453, "Output",ExpressionUUID->"62603607-b448-4c0c-a14b-cf3f612b75a7"]
}, Open  ]],
Cell[CellGroupData[{
Cell[64294, 1283, 380, 5, 30, "Input",ExpressionUUID->"e83bc1c5-bd00-41ea-9d47-a5e56c6362e9"],
Cell[64677, 1290, 1055, 15, 82, "Output",ExpressionUUID->"e27b1dbe-b8a5-4991-a142-6ebd44229383"]
}, Open  ]],
Cell[65747, 1308, 151, 3, 30, "Input",ExpressionUUID->"fb0e53f0-f5a7-4105-810e-f92f2affe910"],
Cell[CellGroupData[{
Cell[65923, 1315, 200, 3, 30, "Input",ExpressionUUID->"2ea65a78-2a23-40d7-9307-6538e75bb2e3"],
Cell[66126, 1320, 166, 2, 34, "Output",ExpressionUUID->"41691a47-786a-4ad1-9671-3d0607712d01"]
}, Open  ]],
Cell[66307, 1325, 156, 3, 30, "Input",ExpressionUUID->"f672c13b-769c-4ac4-a670-77d8bafea84a"],
Cell[CellGroupData[{
Cell[66488, 1332, 246, 4, 52, "Input",ExpressionUUID->"6495c282-7371-4fbc-bdd0-d0b11f9b4890"],
Cell[66737, 1338, 321, 5, 34, "Output",ExpressionUUID->"709d811e-3df5-40bf-b36d-e2c813f80144"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[67119, 1350, 217, 4, 67, "Section",ExpressionUUID->"2d09d6c9-4f02-4244-99ce-9562dc0d0a1a",
 InitializationCell->True],
Cell[CellGroupData[{
Cell[67361, 1358, 167, 3, 54, "Subsection",ExpressionUUID->"c23576a4-89e7-4a6e-aa05-9aeea2fcf350"],
Cell[CellGroupData[{
Cell[67553, 1365, 201, 4, 46, "Input",ExpressionUUID->"2932addc-2147-428c-b51d-2a8fee61ac7e",
 InitializationCell->True],
Cell[67757, 1371, 935, 14, 70, "Output",ExpressionUUID->"a47178a7-65a7-4870-ac2b-ea22c9e4c1c6"]
}, Open  ]],
Cell[68707, 1388, 256, 6, 68, "Input",ExpressionUUID->"281b4875-6000-44d3-99dc-1f6a304b53e3",
 InitializationCell->True],
Cell[68966, 1396, 458, 11, 46, "Input",ExpressionUUID->"ac6800f3-5a6b-497e-a91c-8ae4ebd1701d",
 InitializationCell->True]
}, Closed]],
Cell[CellGroupData[{
Cell[69461, 1412, 180, 4, 38, "Subsection",ExpressionUUID->"90f8848a-5d6e-4181-b2a1-53a50fa9040e",
 InitializationCell->True],
Cell[69644, 1418, 5540, 117, 383, "Input",ExpressionUUID->"09a73c68-4558-4956-9a70-ac9c3416046b",
 InitializationCell->True],
Cell[75187, 1537, 1065, 22, 110, "Input",ExpressionUUID->"c7680075-aa93-40cb-b5b2-dd27ceeda0ae",
 InitializationCell->True],
Cell[76255, 1561, 2984, 74, 299, "Input",ExpressionUUID->"abf11c1b-2248-40c5-934f-913d9e38b578",
 InitializationCell->True],
Cell[79242, 1637, 2494, 60, 194, "Input",ExpressionUUID->"1bdd8932-f950-437e-8771-b7db70b5ab56",
 InitializationCell->True]
}, Open  ]],
Cell[CellGroupData[{
Cell[81773, 1702, 162, 3, 54, "Subsection",ExpressionUUID->"accede30-6ecd-4f70-9bad-f5d61a42f2ef"],
Cell[81938, 1707, 8991, 193, 677, "Input",ExpressionUUID->"32388c31-3ab2-425a-a5ea-f4d52411494b",
 InitializationCell->True],
Cell[90932, 1902, 4549, 100, 341, "Input",ExpressionUUID->"97c89c7c-8fc7-46e4-a26f-e257dc534e88",
 InitializationCell->True]
}, Open  ]],
Cell[CellGroupData[{
Cell[95518, 2007, 161, 3, 54, "Subsection",ExpressionUUID->"06f3d861-2006-4c15-b584-026ac9796df3"],
Cell[95682, 2012, 11853, 285, 878, "Input",ExpressionUUID->"914f57e0-38f7-4022-99d4-37cbd98e7bc6",
 InitializationCell->True],
Cell[107538, 2299, 8527, 141, 194, "Input",ExpressionUUID->"64c0296d-a357-4cca-87ef-ceea1e7ff752",
 InitializationCell->True],
Cell[116068, 2442, 2034, 56, 173, "Input",ExpressionUUID->"4331df09-ac34-442e-86f4-06d5231d8cef",
 InitializationCell->True],
Cell[118105, 2500, 9601, 170, 257, "Input",ExpressionUUID->"42e705b9-9df0-4697-ba68-dc7f16456f2a",
 InitializationCell->True],
Cell[127709, 2672, 6547, 104, 89, "Input",ExpressionUUID->"8a63fa82-e524-42da-a705-3aebf404fd5c",
 InitializationCell->True],
Cell[134259, 2778, 10914, 198, 194, "Input",ExpressionUUID->"d8ab1164-e2eb-4be6-8c8e-05e4e5751014",
 InitializationCell->True],
Cell[145176, 2978, 328, 7, 46, "Input",ExpressionUUID->"0424a10f-b838-4f9a-94c2-812959f59bcf",
 InitializationCell->True],
Cell[145507, 2987, 14664, 325, 635, "Input",ExpressionUUID->"7355f935-e13e-4e39-ba3e-dc7c917e55f2",
 InitializationCell->True],
Cell[CellGroupData[{
Cell[160196, 3316, 370, 7, 30, "Input",ExpressionUUID->"c551302a-cce1-40c4-9bf0-19ce2d355ddf"],
Cell[160569, 3325, 217, 3, 34, "Output",ExpressionUUID->"7a7a7b9f-7bd2-4cd5-b7cc-fd35d159b502"]
}, Open  ]],
Cell[CellGroupData[{
Cell[160823, 3333, 207, 3, 30, "Input",ExpressionUUID->"9d26c1b9-aa97-4e7f-83cb-c1145b55fbbe"],
Cell[161033, 3338, 183, 3, 57, "Output",ExpressionUUID->"3de4dc41-8d3e-4cf0-9663-aa66d2163706"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}
]
*)

